How to backup and restore OpenERP database ?

There are two methods to perform backup and restore operation for OpenERP database.

Lets go through step by step:

Method 1: Using GUI

Follow the steps to create backup and restoring database.

1) Goto Login page,
2) Click on Manage Databases,
3) There are various options available on left side bar.
4) Follow the screens displayed below.

OpenERP database backup

OpenERP database backup

OpenERP database restore

OpenERP database restore

Method 2: Using command prompt (Using PostgreSQL)

It is advisable that if backup has been taken from command prompt then restoring should be from command prompt only.

Follow the screen steps for creating backup and restore.

1) Executing following command will create a blank database.
Command: createdb –encoding=UTF-8 testdb

Create blank database

Create blank database

2) Executing following command will create a backup of database : openerp_61
Command: pg_dump -f backup_openerp_61 openerp_61

OpenERP database backup from command prompt

OpenERP database backup from command prompt

3) Execute following command will restore your db into blank database created in step 1.
Command: psql testdb < backup_openerp_61

OpenERP restore database from command prompt

OpenERP restore database from command prompt

Problem during restoring from command prompt :

Upto here, assume that everything is working in the same PC. Now let say, someone is trying to restore database using command prompt for which, the database has been backed up from another PC.

Please check following screenshots.

OpenERP database backup process

OpenERP backup database process

In above case, You can see the error message `role “john” does not exist`. It means that database has been backed up from another PC having name is ‘john’.

So now, in this case there are two solutions to restore this database as follows.

1) Either you can open dump file, and change the role name wherever you find name ‘john’ as your role displayed in following screen. Here I have changed name as ‘navrang’ in place of ‘john’.

OpenERP restore database process

OpenERP restore database process

2) Another option is, if dump file is too long to change role/owner name, then you can create a user in your PC named ‘john’ so it will work as it is.

And this way we can restore our database.

  • ton123 says:

    Well done, thank you. This work for me. Of course there are more ways, but these two methods are basic. I would like to have an automatic backup also. There is a module in OpenERP called auto_backup for this. But I can’t get
    It working.

  • auto_backup module is also working for version 6.1. You have to provide information like host name (default is localhost) where openerp server is running, xml-rpc port (default 8069), database name for which you want to take backup and direcory path where you want to store backup file and save that record. There is schedular working behind it which will take backup once in a day.

  • Yvonne says:

    whoah this blog is fantastic i really like studying your articles.
    Keep up the good paintings! You understand, lots of
    persons are hunting round for this info, you can
    aid them greatly.

  • Shona says:

    Usually I do not read article on blogs, but I would like to say that this
    write-up very forced me to try and do so! Your writing style has been surprised me.
    Thank you, quite great article.

Leave a Reply

Your email address will not be published.

Related Posts
Subscribe to Blog via Email

Join 634 other subscribers

Facebook Pagelike Widget
  • lilhedr
  • CBD gummies for pain
  • setiaji
  • Movies Route
  • Acespritech Solutions Pvt. Ltd.
  • Hairstyles
  • New Affiliate News
  • derrickkorku
  • corporateinvestigatordelhi
  • Crave Freebies
  • Ms Shubharambh IT Solution Pvt Ltd
  • vteamitdevelopers
  • turkce
  • previsea
  • diziler
  • turkce
  • homeworkouthabit
  • resume
  • Jozsef Torsan
  • escort bayan
  • turkce
  • devangpipaliya
  • turkce
  • Kieran Doswell
  • pityfox
  • webinarstarterblueprint
  • turkce
  • erotik
  • roslionel
  • nongsanvietshop1
  • Mr. Gadget Heisenberg
  • buy anabolic online
  • sijisblog
  • Buy USA Private Proxies
  • Seo
  • Myownbosszone
  • magePoint
  • kusbas
  • Nanoarch Software Solutions
  • paynet11
  • turkce
  • 720p
  • pharmacies shipping to usa
  • satyamslg34gmailcom
  • erotik
  • penelopeburns
  • Zenaida Morrell
  • turkce
  • Sir. George Githunguri
Mobile Application
%d bloggers like this: