Enable Dark Mode!
how-to-restore-a-database-in-odoo-15-erp.jpg
By: Shabeer PT

How to Restore a Database in Odoo 15 ERP

Technical Odoo 15

Either the odoo interface itself or psql commands can be used to restore the database. It will be advisable to use PSQL commands when working with huge databases. To restore a backup, we need a backup of the database.  We can easily backup the database from the odoo front end and restore it either from the front end or using the terminal.

Backup Database:

Go to the database manager (<odoo-url>/web/database/manager) and click the backup button.

how-to-restore-a-database-in-odoo-15-erp-cybrosys

On clicking the backup button, a popup window will be shown.

how-to-restore-a-database-in-odoo-15-erp-cybrosys

Master password: the given password when you create the database.

Backup format: we can backup the database in two different formats,

1. Zip (Include filestore)

2. Pg_dump custom format( without filestore)

On selecting the zip option, it will generate a zip file including the filestore, dump.sql, and manifest.json.

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

On clicking the backup button, it will generate a database backup.

Restore Backup:

From the front end, we may restore the database. To restore the database, go to the database manager at odoo-url>/web/database/manager and select "Restore Database."

how-to-restore-a-database-in-odoo-15-erp-cybrosys

On clicking the button, a popup window will appear.

how-to-restore-a-database-in-odoo-15-erp-cybrosys

Provide the master password, brows the .zip file from your directory, give a name to the database and click the continue button.

If we don't want to restore the filestore (i.e. the images and attachments), we can use the dump.sql file from the terminal to restore the database. Extract the database backup .zip file which contains filestore, manifest.json, and dump.sql.

To restore the database using dump.sql

01. Create a database

02. Execute the command to restore the database from dump.sql.    

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

Similarly, we can restore the .dump backup file. Go to database manager, then back up the database in the pg_dump custom format (without filestore), we will get a file .dump format

Run the following commands in the terminal to restore the database.

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

Visit our blog Odoo 15 Database Management for further information on how to access and manage the database.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment

 
whatsapp
location

Calicut

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

location

London

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

location

Kochi

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

location

Bangalore

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

Send Us A Message