This question has been flagged
2 Replies
2550 Views

Hi

About two years ago I was being lazy and didn't install odoo into a vm. I didn't intend to actually use odoo, turns out it is a really good product.

I am using version 9, and have setup a VM on my new server with a fresh install of V.9

I've attempted to use the web interface, and it fails. Oddly the log file has no events about the failure? /var/log/odoo/odoo-server.log, I gotta be looking at the wrong log...

I am also guessing that I have installed modules I have completely forgotten about, that may be the source of the issue.

I would be entirely happy with exporting the data, but I completely failed to understand how to restore the IDs for each major field. As I attempt to move over an item that refers to a customer or product I receive an error stating that ID doesn't exist. I am guessing I don't understand the difference between external ID and Database ID?

Unfortunately odoo is just too good a product for me to just ditch for something that actually lets you back it up...

Where should I start? Thanks for the assistance.

Avatar
Discard
Best Answer

Steps to migrate odoo from one server to another would be:

1) Take a backup ( http://odooinstanceip:port/web/database/manager) -> backup

2) Setup a new instance of Odoo on your VM

3) Restore from backup option while creating a database on new instance.

You can evaluate changes that have happened to Odoo from version 9 to now (currently 11) and try to migrate to a newer version now itself instead of setting up odoo 9 and then migrate to 11 later on.

Avatar
Discard
Author Best Answer

Anyone having issues restoring via the web interface as I mentioned in my post. Mostly this is for my own reference.

To restore when the web interface fails.

Requires a linux host on the new server.

Extract the zip file from the old server. Transfer the 'filestore' folder and dump.sql file to your new server. (If your web interface is down on the old server the filestore could be manually copied over /odoo/.local/share/odoo/filestore/%databasename, and the database could be manually exported with pg_dump -U odoo %databasename > dump.sql)

Copy the contents of the filestore folder to odoo. First cd to the filestore folder than #: sudo cp ./ /odoo/.local/share/Odoo/filestore/odoodatabase -Rv

Now change the owner of those files to odoo #: sudo chown odoo:odoo /odoo/.local/share/Odoo/filestore/odoodatabase -Rv

Login as odoo create a new database to use as a shell. #: su odoo #: createdb %databasename

Import the database with #: psql %databasename < ./dump.sql

I used this site as reference: http://zeroheure.info/how-to-restore-an-odoo-backup-quick-help/

I think this would work in other versions, as long as you were transferring to the same version, but I think the filestore is located in different directories.

Avatar
Discard