ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171


ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254


Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466


ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

Backup and Restore of complete OpenERP in Linux(Ubuntu)

Contact Form

Hestin Jose's picture

Backup and Restore of complete OpenERP in Linux(Ubuntu)

This is just some simple tips for moving an OpenERP server instance and Database from a Linux server to another Linux physical server. Normally Debain based Ubuntu is recommend to install OpenERP. Hope this will help at least some beginners. Good luck :) This process is normally done using linux commands as mentioned below.

1) On Source Server
.ssh to existing OpenERP server as the user running OpenERP

  • Copy config, binary and init files

demo@openerp:~$ cp /etc/default/demo-server.conf .
demo@openerp:~$ cp /etc/init.d/demo-server .
demo@openerp:~$ cp /usr/bin/demo-server demo-server_bin

  • Backup database

demo@openerp:~$ pg_dump -f OpenERP_devel.tar -F tar -O OpenERP_devel

  • Create an archive with all these files

demo@openerp:~$ tar -czf oerp_backup.tgz *

  • Copy the archive to destination server

demo@openerp:~$ scp oerp_backup.tgz

2) On Destination Server

  • Create a new user(this must be done before copiying the backup from source server)

root@ubuntu-test:~# adduser sme_test

  • Create a postgresql user

root@ubuntu-test:~# su postgres
postgres@ubuntu-test:/root$ /usr/lib/postgresql/9.1/bin/createuser -p 5434 sme_test

  • Set password for user

postgres@ubuntu-test:/root$ /usr/lib/postgresql/9.1/bin/psql -p 5434
postgres=# alter user sme_test with password 'smellycat';

  • Switch to new user

root@ubuntu-test:/home/sme_test# su sme_test

  • Change to home directory

sme_test@ubuntu-test:~$ cd

  • Extract the archive

sme_test@ubuntu-test:~$ tar -zxf oerp_backup.tgz

  • Edit config, init and binary files to cope with new system and database user

  • Switch back to root user and create log file

sme_test@ubuntu-test:~$ exit
root@ubuntu-test:/home/sme_test# touch /var/log/sme_test-server.log
root@ubuntu-test:/home/sme_test# chmod 777 /var/log/sme_test-server.log

  • Copy the edited files to appropriate locations

root@ubuntu-test:/home/sme_test# cp demo-server /etc/init.d/sme_test-server
root@ubuntu-test:/home/sme_test# cp demo-server.conf /etc/default/sme_test-server.conf
root@ubuntu-test:/home/sme_test# cp demo-server_bin /usr/bin/sme_test-server

  • Switch user to new OpenERP user, create database and restore database

root@ubuntu-test:/home/sme_test# su sme_test
sme_test@ubuntu-test:~$ /usr/lib/postgresql/9.1/bin/createdb -p 5434 OpenERP_restore
sme_test@ubuntu-test:~$ /usr/lib/postgresql/9.1/bin/pg_restore -p 5434 -d OpenERP_restore -O Dilavie_devel.tar

sme_test@ubuntu-test:~$ exit

  • Start new OpenERP Server

root@ubuntu-test:/home/sme_test# /etc/init.d/sme_test-server start

  • Connect and test

Anonymous's picture

Kindly guide the same topic

Kindly guide the same topic but with WIndows. Thanks.

Luke's picture

Has anyone tried this with

Has anyone tried this with OpenERP 7 yet? I'd like to move my instance of OpenERP 7 from a webserver over to a server on my LAN.

Anonymous's picture

Good tutorial, i very need

Good tutorial, i very need it, thanks you so much !