restore-database-odoo-13.png
Blogger_636842438619363816.jpg
By: Meera K

How to Restore a Database in Odoo 13

Technical Odoo 13

We can restore the odoo database in several ways. We can easily back up the database and restore the database from the odoo front end.


To do so, go to the database manager option (<odoo-url>/web/database/manager) and click the backup button. 


restore-database-odoo-13-cybrosys


If you set a master password it will ask the master password first, later select the backup format. 


In Odoo, there comes mainly two types of backup format.


1. zip(Include filestore)

2. pg_dump custom format (without filestore)


Upon selecting the first option, it will generate a zip file containing a file store, dump.sql, and manifest.json.


Where, filestore contains all the static files stored on disk such as images, attachments, the dump.sql file mainly contains all the (Postgresql backup) data and the manifest.json file contains the list of modules, Odoo version, database name, Postgresql version and more.

Either you can restore the database from the front end or you can restore the database from the terminal.


To restore the database from the front end, go to the database manager then click the “Restore Database” button.


restore-database-odoo-13-cybrosys


A popup window will appear.


restore-database-odoo-13-cybrosys


Then browse the .zip file of the backup of your database also give the new database name and click the continue button. A new database will be created.


If you don’t want to restore the filestore part(ie the images and attachments), then you can restore the database using the dump.sql file from the terminal. Extract the database backup .zip file, there will be 3 files (Filestore, manifest.json, dump.sql).To restore the database using dump.sql, firstly create a database and then execute the command to restore the database from dump.sql.


Open a terminal from this file location, then enter the following commands to restore the database.


$sudo su postgres
$createdb -O [Owner] [database_name]
$psql [database_name] < dump.sql


In the same way you can restore the .dump backup file .Go to database manager (<odoo-url>/web/database/manager) ,then  backup the database in the pg_dump custom format (without filestore) ,you will get a file with extension .dump.

Open the terminal, then enter the following commands to restore the database.


$sudo su postgres
$createdb -O [Owner] [database_name]
$pg_restore -d [database_name] [dumpfile_name].dump



cybrosys youtube

Comments

0


Leave a comment

 
Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

London

Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message