Automatic Database Backup for Odoo 19 documentation
A guide to automatic database backups: creating schedules, retention, the logs and failure emails, restoring a backup, and the limits.
Documents version 1.0.0Updated Oct 23, 2026
Start here
In plain words: A database that is not backed up is a database waiting to be lost. Automatic Database Backup takes a backup of your Odoo database and its filestore on a schedule, keeps the last ones, deletes the old ones, logs every run and emails you when a backup fails. The file is the same zip that Odoo's own database manager makes, so you restore it the usual way.
Tip: A backup stored on the same disk as the database does not protect you from a dead disk. Point the folder at a mounted network disk, or copy the folder elsewhere with your usual tools.
What you get
| Feature | What it does |
|---|---|
| Schedules | Every few hours, daily, weekly or monthly, at the hour you choose (UTC). Make as many schedules as you need. |
| Database and filestore | A zip with dump.sql, the filestore and a manifest: Odoo's own backup layout. Or a pg_dump custom dump, database only. |
| Retention | Keep the last N backups and/or the backups of the last N days. The newest backup is never deleted. |
| Only its own files | Only the files a schedule created are ever deleted, never anything else in the folder. |
| A log of every run | Date, who started it, result, file, size, duration and the error if it failed. |
| Failure email | The users you choose get an email with the error. |
| Backup now | One button on the schedule, and a test of the folder. |
| Arabic | Everything is translated and works right to left. |
Requirements
| Item | Details |
|---|---|
| Odoo | 19.0 (Community or Enterprise), self-hosted |
| Server | pg_dump installed on the Odoo server, and a folder Odoo can write in |
| Apps needed | None beyond the Odoo base (base, mail) |
| License | OPL-1 (Odoo Proprietary License v1.0) |
Important: This module needs access to the server. It does not work on Odoo Online or Odoo.sh, where backups are managed for you.
Install
- Unzip the package. Inside is
taqnix_auto_backup.zip; unzip it to get the foldertaqnix_auto_backup. - Copy the folder into one of the
addons_pathfolders of your Odoo server and restart Odoo. - Log in as an administrator, activate Developer mode, open Apps and press Update Apps List.
- Remove the “Apps” filter, search Automatic Database Backup and press Install.
# or from the command line ./odoo-bin -c odoo.conf -d YOUR_DATABASE -i taqnix_auto_backup --stop-after-init
Create a schedule
In plain words: Open Settings → Backups → Backup Schedules and press New.
| Field | Meaning |
|---|---|
| Backup folder | An absolute path on the server, such as /var/backups/odoo. Created if missing. Odoo must be allowed to write there. |
| Format | Zip (database and filestore), restored by Odoo's database manager; or a pg_dump custom format, database only. |
| Include the filestore | Attachments and images. Without it the zip holds the database only. |
| Frequency | Every few hours, daily, weekly (choose the day) or monthly (the 1st). |
| At hour (UTC) | The hour of the day, in UTC. For “every few hours” the interval counts from the last backup. |
| Keep the last / Keep for (days) | The retention rules. 0 means no limit. Both can be used together. |
| Email when a backup fails | The users who receive the error by email. |
Tip: Press Test the folder to check that Odoo can write there. It also shows the free space.
Backups run by themselves
In plain words: A job checks every 15 minutes for schedules that are due, takes the backup and plans the next one. Press Backup now on a schedule to take one at once. Each backup file is named
database_YYYYMMDD_HHMMSS.zip.Important: A backup of a large database takes time and runs on the server while Odoo is working. Choose a quiet hour.
Retention
In plain words: After every successful backup the schedule deletes the files beyond its limits: more than Keep the last, or older than Keep for (days). The newest backup is always kept, so a long stop never leaves you with nothing.
| Safeguard | Detail |
|---|---|
| Its own files only | Only files listed in the schedule's logs are deleted, and only if they are directly inside its folder and named like a backup. |
| Failed backups | A failed run removes its partial file and does not count towards the limit. |
| By hand | On a log, Delete the file removes that file only. |
| Deleting a schedule | The backup files stay on disk. |
The logs and failures
In plain words: Settings → Backups → Backup Logs lists every run, scheduled or manual. A failed run is red; open it to read the error.
In plain words: A failed backup is retried at the next slot of the schedule, not every 15 minutes, and the users of Email when a backup fails receive the error.
Restore a backup
In plain words: This module makes backups; restoring uses Odoo's own tools.
| Format | How to restore |
|---|---|
| Zip | Open /web/database/manager, press Restore Database, enter the master password, choose the zip file. |
| Custom dump | createdb new_db then pg_restore --no-owner -d new_db file.dump. The filestore is not in this format. |
Tip: Test a restore on a copy from time to time. A backup you have never restored is only a hope.
Arabic and right to left
Limits
| Limit | Detail |
|---|---|
| Local folder | Backups are written to a folder on the Odoo server. There is no upload to FTP, SFTP or a cloud service; use a mounted disk or your own copy job to take them off the server. |
| Not for Odoo Online or Odoo.sh | You need access to the server and to pg_dump. |
| Runs on the server | The backup is made by the Odoo process. On a very large database, plan it at night. |
| Times are UTC | The hour is in UTC, the server time. |
| Backups are not encrypted | Protect the folder, as it holds all your data. |
| One server | In a multi-server setup, the schedule runs on the server that runs the job. |
For developers
In plain words: Skip this chapter if you only use the module.
| Item | Details |
|---|---|
| Models | taqnix.backup.config (the schedule) and taqnix.backup.log. |
| Methods | _run(trigger) takes one backup and returns its log; _apply_retention(); _next_after(datetime). |
| Job | _cron_run_due, every 15 minutes. |
config = env['taqnix.backup.config'].create({
'name': 'Nightly', 'folder': '/var/backups/odoo', 'frequency': 'daily', 'hour': 1, 'keep_last': 14,
})
log = config._run('manual')
print(log.state, log.filename, log.size)Troubleshooting
| Problem | What to do |
|---|---|
| “Odoo cannot write in the folder” | Create the folder, or give the user that runs Odoo the right to write in it. Use Test the folder. |
| The backup fails with a pg_dump error | Check that pg_dump is installed and not older than your PostgreSQL server. The error is in the log. |
| Nothing runs | Check that the scheduled action “Automatic backup” is active and that Odoo's cron is running (workers or --max-cron-threads). |
| I did not get the failure email | Add yourself to Email when a backup fails, and check that outgoing mail works. |
| The disk is full | Lower Keep the last, or use Keep for (days), or move the folder to a bigger disk. |
Updating and removing
Replace the folder with the new version, restart Odoo and run -u taqnix_auto_backup. Schedules and logs are kept. Removing the module deletes the schedules and logs; the backup files stay on disk.
Support
Installation help and bug fixes are included for 6 months, with lifetime updates. Contact us through the marketplace page where you bought the module or write to support@taqnix.com with your Odoo version and a screenshot.