How to restore your Odoo database from backup
Odoo is an open ERP system that uses PostgreSQL as a database backend. Regularly taking back up of the database can avoid data loss.It is very useful for everyone who has installed Odoo. Odoo database can
Video Contents
0:00 Introduction
1:18 How to take Odoo database backup?
6:17 How to create a database
7:11 Restoring a database using dump.sql
11:42 Taking backup using the second option
be restored in many ways:
• Front end(Database management)
• Back end(Command Line)
First, let us see how we can restore the database from the front end:
Before restoring a database it is necessary to make sure that you have set a master password. If you
haven’t set then it can be done by following steps:
Click manage databases-Set Master Password
A database is created, deleted, duplicated, or restored only after setting a master password. A database
can be restored only when you have a backup of that database.Backup option is attached with each
database. So when you click the Backup button it shows a window that asks for a master password and
Backup format can be:
• zip(includes file store)
Includes 3 static files stored on disk like images,dump.sql which contains postgresql
backup,manifest.json file which contains a list of modules,dbname,postgresql version, Odoo version
etc.
• pg_dump custom format(without filestore)
After choosing the file format click on the backup button. Then save that file so that it can be used for
restoration.
Now let us see how we can restore this database:
Click Restore Database-Give master password, choose the backup file from your system, give the database name. After that in order to avoid conflicts between databases you have to specify whether this
database is a copy of it was moved. Then click continue.
Now let us see how we can restore a database using the command line:
• Use the command :sudo su postgres
• Create a database using the command:
createdb -0 username/ownername dbname
• Now let us restore DB using dump.sql file from the backup file with zip format using the
command:
psl dbname dump.sql
In this case, we have to make sure that we have extracted the zip file.
Now refresh your browser and you can see the restored database in the database list.
If you have taken the backup with pg_dump custom format ie.without filestore which contains only a file
with .dump extension. Then we have a different command for restoration:
pg_restore -d dbname file.dump
#odoo13 #odoodatabase #odoobackup
For More Videos Subscribe to our YouTube channel.
#Restore #Odoo #Database #Backup