Backup and Restore OpenERP Database


This article describe you how to backup and restore OpenERP database.There is two way to make backup and restore database.It means You can do by web-Interface or by commend prompt

web-Interface (GUI) :-

Simple steps for backup and restore OpenERP database:

1] Open Login screen click on manage database 





 















2] click backup menu and select your database and set password and click backup button and just save that database dump file on your system






 


3] For Restore database, Browse your database dump file set password and make name to database and click restore 




 














commend prompt :-

create database

 createdb database_name
 

Backup database :-

pg_dump --cluster 9.1/main --format=c old_database_name > new_database_name




 





Restore database :-

1 : Check file type by following command

          file <name of restore db which you want> [EX: file database_name ]



         
 








2 : If file type is simple PostgreSQL dump at that time you can you following command(dump db)

            DB=new_database_name && createdb --cluster 9.1/main $DB && pg_restore --cluster 9.1/main --no-acl -O -d $DB <  backup_database_name.dump
           
3 : If file type is ASCII C program text, with very long lines at that time you can use following command (sql db)

            DB=new_database_name && createdb $DB && psql -d $DB < backup_database.dump

[Note: When you can you step2 instead of steps3 you can get error : pg_restore: [archiver] input file does not appear to be a valid archive]





 



how to Restore zip file Database :-

First Create database using cretedb database_name then type following commend in terminal

    gunzip -c filename | psql database_name



How to  restore PostgreSQL database from .tar file

First Create database using cretedb database_name then type following commend in terminal

pg_restore -c -i -U systemusername -d dbname -v "/home/mayur/workspace/db_backup.tar" -W


Hope that was helpful.

If I just made your day a little better then thank me with a coffee or maybe a pizza


Thanks,

Mayur Maheshwari



13 comments:

  1. Dear Mayur, I have been trying to locate the database backup that was created after I clicked on the 'Backup' button on OpenERP web interface. Do you have any idea where the file is saved once we click that button? OpenERP doesn't ask us for a location to save the backup file at any point in the process!

    ReplyDelete
    Replies
    1. Hello Bharath,

      OpenERP does not ask for a location to save the backup file. For this functionality you need to set your browser settings so browser will guide you more where to save this file.

      Suppose If you use Mozilla Browser then check your settings.

      Edit -> preference -> General tab

      Now you see Downloads tab just tick boolean field "Always Ask me where to save files". After that when you save a backup file it will ask you for location.

      Same scenario will work for chrome Browser.

      Delete
    2. Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download Now

      >>>>> Download Full

      Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download LINK

      >>>>> Download Now

      Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download Full

      >>>>> Download LINK g2

      Delete
  2. Hi,

    Could you help me about saving configurations to re-install this in a new database without demo data?

    My problem is to set database default configuration values.

    ReplyDelete
  3. hi!

    I restored a database on local debain6 machine running openerp 7 and postgres 9.2 through pgadmin3, it worked fine.

    but for my vps I have to do the same operation through ssh terminal I used the command
    psql -f /home/openerp/dbbackup -d test2 -h localhost -p 5432 -q

    its not working! any help ?

    Thanks

    ReplyDelete
  4. Hi,
    I installed the module db_backup_ept from OpenERP, I got auto and manual backup, in .sql format, how can i convert to .sql to dump for OpenERP or .backup for PgAdmin, or how can I restore this database. Help Me...

    ReplyDelete
  5. Hi Mayur,
    Its really awsome man. Really it has reduced my lot of time.

    ReplyDelete
  6. This is a helpful article about database recovery,..
    Thanks for this share,.
    " website backup"

    ReplyDelete
  7. Hi Mayur,

    Can you explain this same concept for Odoo 9.

    I have taken my db backup in .sql format. May I know how to restore it in odoo 9 ?

    ReplyDelete
    Replies
    1. Hi Nivas,
      for .sql file you should try below:

      psql -d 'dbname' -f <.sql file path>

      Thanks

      Delete
  8. Odoo 9 to a new Server?

    it gives me a database error when restoring?

    Please note I'm not a tech savvy :)

    I'm new to the field

    ReplyDelete
  9. Hi! Quick question that's entirely off topic. Do you know how to make your site mobile friendly? My blog looks weird when browsing from my iphone4. I'm trying to find a theme or plugin that might be able to resolve this problem. If you have any recommendations, please share. Many thanks!
    epicor dashboard

    ReplyDelete
  10. Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download Now

    >>>>> Download Full

    Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download LINK

    >>>>> Download Now

    Mayur Maheshwari - Techno-Functional Consultant Odoo (Openerp): Backup And Restore Openerp Database >>>>> Download Full

    >>>>> Download LINK Ai

    ReplyDelete