How to Backup an Odoo Database Using the Web Interface and Command Line

Backup Odoo Database
October 20, 2025 by
How to Backup an Odoo Database Using the Web Interface and Command Line
Fazri Muhammad Yazid


How to Backup Odoo Database

In this guide, we’ll cover how to restore your Odoo database safely using two main methods:

  1. Through the Odoo Web Interface
  2. Through the Command Line (CLI) using PostgreSQL tools

Backup via Odoo Web Interface

1. Open odoo database manager page

Navigate to the following URL:

	​https://<your-domain>.com/web/database/manager

You’ll see the list of available databases when entering this page.

Example:

2. Select the Database to Backup

Click Backup next to the database you want to save.

3. Master Password and Select Backup Format

Once you click Backup you have to input Master Password​and Backup Format in this case you just have to select zip (includes filestore).

Example:


4. Click "Backup"

Odoo will generate a .zip file containing:

  1. Database dump (.dump)
  2. Filestore data

Backup via Command Line (CLI)

The command-line method is more flexible and faster for large databases, as the Odoo web interface often fails to back up large databases due to memory and timeout limitations during the compression process.

The following steps explain how to perform a database backup in Odoo using the command line, which is more reliable for handling large data sets.

1. Login to your SSH server 

Access your Odoo server via SSH:

Example:


2. Create a Backup Folder in SSH

Create a directory to store all backup files (recommended path: /opt/backup):

	​sudo mkdir -p /opt/backup
​sudo chmod 777 /opt/backup

3. Back Up the Database

Run the following command to back up your database:

sudo -u postgres pg_dump YOUR_DATABASE_NAME > /opt/backup/YOUR_DATABASE_NAME$(date +%Y%m%d).sql

Example:

sudo -u postgres pg_dump V17_COMMUNITY > /opt/backup/V17_COMMUNITY_$(date +%Y%m%d).sql

4. Transfer the Backup File to Your Local Machine

Now that the backup file is stored on the server, use scp to copy it to your local computer.
Run this command from your local machine:

scp youruser@your-server-ip:/opt/backup/BACKEDUP_DATABASE_FILE.sql /home/user/Download

Example:

scp sgeede@192.168.1.169:/opt/backup/V17_COMMUNITY_20251020.sql /home/sgeede/Download/

 

If you need any help about odoo, please chat with us.