Odoo Database Backup & Restore
Steps:
- Go to the Manager Link
- Set Master Password
- Backup the database
- Restore the database
- Delete the old database
Go to following URL
Click on "SET MASTER PASSWORD" Set the master password for first time.
Backup the databae:
Restore:
Click on restore to give new name to database and add backup file that you download when you click on Backup
If you get any error related to Command pg_dump not found
Add following line in the odoo.config file
pg_path = C:\Program Files\PostgreSQL\10\bin # this is the postgre bin path
Using Command Line
Through command line some time create CSS error when you log in to Odoo (mostly do not use this)
To Backup the Database:
- login
the Linux
- open
terminal by pressing "Ctrl+Alt+t"
- Run
the following commands in terminal
>> sudo su - odoo -s /bin/bash // odoo is linux user
>> pg_dump databasename > db_back/anyname.dump // command databasename>foldername/filename.dump
- Open
Files, the backup will be available at the db_back directory
- Copy
the backup.dump file and save it in some external drive.
To Re-Store the Database:
- login
the Linux
- open
terminal by pressing "Ctrl+Alt+t"
- move/copy
the backup file (".dump") at the home directory
- Run
the following commands in terminal one by one
>> sudo -u postgres psql
>>
CREATE DATABASE databasename OWNER = server;
//first create the new database
>>
.\q
//exit form psql
Go directly to the user folder and
past the backup and then use the command to restore the database.
>>
psql newdatabsename < filename.dump
>>
exit
Comments
Post a Comment