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.


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

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

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

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.

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’.

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.
Related articles
- How to drop the database in OpenERP? (intellectseed.wordpress.com)
- How to create database in OpenERP? (intellectseed.wordpress.com)
- How to install OpenERP 6.1 and OpenERP 6.0 on Windows Vista and Windows 7 in 10 Minutes (intellectseed.wordpress.com)
- Maintain log of Product sale price in OpenERP… (intellectseed.wordpress.com)