Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backup Odoo db from within odoo

I need to backup the current db while logged into odoo. I should be able to do it using a button, so that suppose I click on the button, it works the same way as odoo default backup in manage databases, but I should be able to do it from within while logged in.

Is there any way to achieve this? I do know that this is possible from outside odoo using bash but thats not what I want.

like image 484
Yaseen Shareef Avatar asked Jan 14 '15 04:01

Yaseen Shareef


People also ask

How do I download Odoo database?

Access your instances at https://accounts.odoo.com/my/databases. Click on Manage your Databases : Click on the Backup button to the right of the database name to start backup and downloading within a second.

Where is Odoo database stored?

When working with Odoo, all the data of your instance is stored in a PostgreSQL database. All the standard database management tools you are used to are available, but Odoo also proposes a web interface for some common operations.

Which database is used in Odoo?

Why Postgresql database using in OpenERP? Odoo.


1 Answers

You can use the CURL to download the full backup (assets + DB), this method is comparatively faster than pg_dump.

curl -X POST \
-F "master_pwd=${ADMIN_PASSWORD}" \
-F "name=${ODOO_DATABASE}" \
-F "backup_format=zip" \
-o ${BACKUP_DIR}/${ODOO_DATABASE}.$(date +%F-%T).zip \
${HOST}/web/database/backup

You can wrap inside a custom (your own) Odoo add-on if you wish to. Hope this helps.

like image 173
Vipin Kohli Avatar answered Sep 19 '22 18:09

Vipin Kohli