Odoo 9: restore using curl
- Category: odoo / openerp
- Published: Sunday, 08 October 2017 10:31
- Written by dedet
- Hits: 1298
- zip & unzip
Install additional requirement
# apt-get install zip unzip curl
To restore Odoo 9 via web front end using curl, you need to parse 4 parameters, they are:
- master password: master_pwd
- name: name
- backup file (in zip): backup_file
- restore option (copy or move): copy=true
Regarding to web front end we can use copy option for almost restoring Odoo 9.
In order to avoid conflicts between databases, Odoo needs to know if this database was moved or copied. If you don't know, answer "This database is a copy".
Here is the command to restore Odoo 9 via web front end using curl:
$ curl -F 'master_pwd=password' -F
backup_file=@/home/user/test.zip -F 'copy=true' -F 'name=dbname'
You can automate restore your Odoo 9 in backup site using cron. For back up, please refer to backup procedure.