The Odoo database management interface offers tools to create, duplicate, delete, backup and restore a database. The database management interface is protected by a master password. This password is required to create, delete, dump or restore databases.
Let’s check how to access the odoo database management interface.
Go to the login screen of Odoo. If you are authenticated just log out and at the bottom of the login screen you can find ‘Manage database’.
Upon clicking the manage database, it redirects to another page where you can create, delete, backup, duplicate, restore and set a master password.
Set a Master Password
Master password in Odoo is used for various database operations like create, delete, backup, restore etc. The master password can be set by clicking ‘Set Master Password’. If you want to change the master password, enter the old password at ‘master password’ and at the ‘new master password’ fieldsets a new password.
How to create a new odoo database
Once you click on ‘create database’, a page opens to enter the database details. Here is a database of ‘test_db’ is creating. First, enter the master password. Then email and password entered for login credentials. Using this email and password, one can log in to the database. You can also add phone number and language. The country selected as ‘India’ so that Accounting package for that particular country is installed.
Check-in ‘Demo data’, if you need demonstration data. This will help you to test run and to set up a demonstration for users.
Click on continue and wait for the database to be initialized. Now odoo will redirects to Odoo Apps as Administrator. We can install the modules as per the requirements and use them.
How to create odoo database backup
Sometimes we need to back up the database for future use.
So click on the ‘Backup’ option for the desired database that we want to use in future. Enter a master password, the database name for the back is automatically there. We need to select the backup format also. Here we selected the zip format and click on ‘Backup’.
The backup format is mainly two types:
1. Zip (includes filestore)
2. Pg_dump custom format (without filestore)
If the backup file is in ‘zip’ format, it will store the filestore also, while in ‘pg_dump custom format’ it is used only in development database and doesn't really care about the filestore. A filestore includes all static files like images,attachments,dump.sql file (contain all Postgresql data), manifest.json file (contain a list of module .database, Odoo version etc)
How to duplicate the Odoo database
The Odoo database can also be duplicated. Sometimes we need to do some test runs on existing data. But that may not affect the existing data too. In such cases, we can use database duplication and experiments can be performed on these duplicated databases.
So click on the ‘Duplicate’ option for the desired database to create a duplicate copy of that particular database. Here also enter the master password. By default, the database name of duplicated one is there and a new name is added, in which the duplicated file will be saved in the new name in order to avoid conflicts in the name. Then click on ‘continue’.
How to Restore Databases
If one wants to restore the database that you have already backup, you can use the ‘Restore Database’ option.
As the above cases first enter the master password and then select the zip file you have already back up. Also, provide the database name.
How to delete a database
One can delete the database by clicking the delete option corresponds to the database you want to drop/delete. Suppose once the test runs on a duplicated database is over, one might delete that database. In such situations delete database options can be used.
Enter master data and the database you want to delete is already there. Now click on Delete.
This is how an Odoo database can be managed in version 13.