Skip to Content

Documentation

How to set up automatic Odoo backups

Everything the module does, every screen, and how to restore a backup when you need it. Screens shown are from the Odoo 20 version.

Get Auto Backup for Odoo See all features

Overview

Auto Backup adds a Backups app to Odoo. It dumps your PostgreSQL database with pg_dump, copies the filestore, and sends the files to a local folder, an SFTP server, Google Drive, Dropbox or Amazon S3 on a schedule. Every run is logged, old files are purged automatically, and a dashboard shows the health of every job.

5 destinationsLocal, SFTP, Google Drive, Dropbox, Amazon S3
5 dump formatsCustom, SQL, TAR, ZIP, dump with filestore
One clickRun a backup or test a connection
Auto purgeOld backup files and old run history

Requirements

The Odoo server needs the PostgreSQL client tools installed, so pg_dump is available to the Odoo process. The module works on Community and Enterprise and runs on the standard Odoo scheduler (cron).

pg_dump --version

Cloud destinations need the matching account: a Google Cloud OAuth client for Google Drive, a Dropbox app for Dropbox, or access keys for an S3 bucket.

Install

  1. Get auto_backup_odoo from the Odoo App Store and add it to your addons path.
  2. Update the Apps list and install Auto Backup.
  3. Open the new Backups app from the main menu.

Create a backup job

A job is one database going to one destination. Click New job, pick a destination tile, then fill in the three tabs: where the files go, which database to dump, and how long to keep old copies.

  1. Choose the destination and enter its folder or credentials.
  2. Enter the database name and the connection values from your Odoo config file.
  3. Pick a dump format and set Delete backups older than (days).
  4. Click Test connection. It checks the credentials and the folder before the first run.
  5. Click Run backup now, then check the result in History.

The smart buttons on the form show the backup count, last run, next run and run history. The filestore is saved to its own folder, separate from the database dumps, and each run posts a chatter message with the path of the saved file.

Backups / Jobs / NewBackup job form with destination tiles, Test connection and Run backup now buttons

The job form: destination tiles at the top, Test connection and Run backup now in the header.

Destinations

Create one job per destination to keep copies in more than one place, for example a local copy and an offsite copy on Amazon S3. All jobs run on the same schedule and appear on the dashboard.

DestinationWhat to enter
LocalA folder on the Odoo server, for example /opt/odoo/backups.
SFTPHost, user and remote path of another machine reached over SFTP.
Google DriveA Drive folder link, or leave it empty for My Drive. Sign in with OAuth 2.0 from the job form.
DropboxA path inside your Dropbox app folder. Authorize the account from the job form.
Amazon S3Bucket and key prefix. Use access keys on the form or the server's ~/.aws/credentials.

Dump formats

Backups are made with pg_dump, so every format restores with standard PostgreSQL tools. Use custom or TAR for databases over 1 GB.

FormatBest for
Custom archiveRecommended. Compressed, restored with pg_restore, lets you restore single objects.
Plain text SQLVery small databases you want to read or edit by hand.
TAR archivepg_restore with the option to reorder or exclude objects.
ZIP archiveA single zipped file that is easy to move around.
Dump with filestoreDatabase and attachments zipped together in one file. Best for smaller databases.

Schedule and retention

Go to Settings › Backups. Turn on automatic backups, set how often they run, and see the next run time without opening the scheduled action.

  1. Run every active job on a fixed interval, or open the advanced schedule for more control.
  2. Set Delete backups older than on each job. Files past that age are removed automatically.
  3. In the Monitoring block, turn on failure notifications and history cleanup.
Settings / BackupsOdoo Settings page for Backups with schedule, next run, failure alerts and history retention

The Backups page in Odoo Settings.

Dashboard

The dashboard is the first screen of the Backups app. The top line says whether every job is healthy and when the last good backup finished.

  1. Health cards: active jobs, success rate over 30 days, failure count and the next scheduled run.
  2. 14-day activity chart: one bar per day, green for successful runs and red for failed ones.
  3. Overview panel: status of the last run, total size backed up in 30 days and the current schedule.
  4. Job cards and recent runs: each job with its database, destination, retention and last result, plus Run now and History buttons.
Backups / DashboardBackup dashboard with health cards, 14-day activity chart, overview panel and job cards

The dashboard, with one failed night visible in red.

History and alerts

Backups › History keeps one line per run with the job, database, destination, start and end time, duration, file size and status. The trigger column shows whether a run was manual, scheduled or imported.

When a backup fails, the dashboard status turns to failed, the day shows red on the chart, and with Notify on failure enabled a to-do is scheduled on the job. A weekly cleanup deletes history older than the number of days you set. Enter 0 to keep it all.

Backups / HistoryBackup history list with job, start time, trigger, duration, size and status

Run history with a failed Dropbox run highlighted.

Built-in help

Every job has a Help tab. It explains which values to copy from the Odoo config file, what each format is for, how to write folder paths for each destination, and how to create Google Drive OAuth credentials and Amazon S3 keys.

Backups / Jobs / HelpHelp tab on the backup job form

The Help tab on the job form.

Restore a backup

The module creates backups. You restore them with standard tools, which also works for moving a database to a new server.

Backup fileRestore with
Custom or TARpg_restore
Plain SQL or ZIPpsql, after unzipping a ZIP file
Dump with filestoreThe Restore button of the Odoo database manager
createdb -O odoo restored_db
pg_restore -d restored_db --no-owner backup.dump

# plain SQL
psql -d restored_db -f backup.sql

Restore steps

  1. Download the backup file from your destination (local folder, SFTP, Google Drive, Dropbox or Amazon S3).
  2. If the file is a ZIP, unzip it.
  3. Create an empty database: createdb -O odoo restored_db.
  4. Load the dump with pg_restore (custom or TAR) or psql (plain SQL).
  5. Copy the matching filestore folder into the Odoo data directory under filestore/restored_db.
  6. Restart Odoo and log in to the restored database.
For a database restore, also copy the matching filestore folder back into the Odoo data directory under filestore/your_database_name.

Support

Need help with setup, found a bug, or want a new backup destination? Email me directly at hilarak@gmail.com. Include your Odoo version, the destination you use and any error from the job's chatter or History, and I'll get back to you.

Email support Buy the Odoo backup module

Did the module or the support fix your problem? Please leave a review on the Odoo App Store page. It takes a minute and helps other Odoo users find the module.