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.
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.
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.
Why Postgresql database using in OpenERP? Odoo.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With