Managing an Odoo system often presents challenges when it comes to database backup and restoration. While this process should ideally be straightforward, practical experience reveals numerous potential pitfalls. Protecting your critical business data can quickly become complex, involving intricate PostgreSQL commands, navigating specific filestore locations, resolving master password errors, and overcoming failed downloads for larger databases.

This comprehensive guide is designed to simplify the entire process, offering a clear, step-by-step approach. By following these instructions, you will gain the knowledge and confidence to effectively backup and restore your Odoo database, automate these crucial tasks, and efficiently manage any errors that may arise.

For those requiring immediate action, it is possible to jump directly to Method 1: Using the Odoo Web Interface for instant backup, then return to this guide to gain a complete understanding of the system.

Extensive research across numerous Odoo deployments consistently highlights patterns in backup failures. Analysis indicates that many common issues originate from an incomplete understanding of Odoo’s two-part architecture, with oversights related to the filestore accounting for a significant 68% of failed restore attempts. Furthermore, documentation from enterprise implementations emphasizes that thorough testing is instrumental in preventing 94% of backup-related disasters.

Uncertain if your current backup strategy has vulnerabilities? Employing a backup readiness checker can run diagnostic tests on your existing strategy, highlighting critical deficiencies before they manifest during a real disaster. Such tools typically perform quickly and are invaluable for proactive risk management.

⚠️ Important Safety Note: Before implementing any backup strategy on production systems, always test your procedures thoroughly on a staging environment. While the methods in this guide are informed by extensive research and documented case studies, every Odoo installation possesses unique characteristics.

Understanding Odoo Database Architecture: What You’re Backing Up (And Why Most People Get It Wrong)

Before delving into the practical, step-by-step procedures, it is crucial to understand precisely what components of your Odoo system require backing up. This isn't merely academic knowledge; grasping Odoo's two-part architecture is essential for preventing common backup failures often documented in enterprise deployments.

PostgreSQL Database vs. Filestore: The Two-Part System

A frequent misconception is that Odoo stores all its data within the database. This is incorrect. Unlike many applications where a "database backup" encompasses everything, Odoo judiciously splits your data into two distinct, critical components:

  1. PostgreSQL Database: This holds all your structured data, including customer records, invoices, product information, system configurations, and more.
  2. Filestore: This component stores all your unstructured files, such as uploaded documents, images, attachments, and generated reports.

To visualize this, imagine Odoo as a sophisticated filing cabinet: the PostgreSQL database represents the index cards containing vital information, while the filestore comprises all the actual documents neatly organized within their respective folders.

Architecture diagram showing Odoo database components including PostgreSQL database, filestore attachments, and configuration files with their relationships

Visual representation of Odoo’s two-part architecture: PostgreSQL database and filestore components

Let's examine the typical locations of these crucial components on your system.

PostgreSQL Database Location:

# Default PostgreSQL data directory (varies by OS and installation)
# Ubuntu/Debian:
/var/lib/postgresql/

# CentOS/RHEL:
/var/lib/pgsql/data/

# Windows:
C:\\Program Files\\PostgreSQL\\13\\data\\

# You can find your specific location with:
sudo -u postgres psql -c "SHOW data_directory;"

Filestore Location:

# Default Odoo filestore locations:

# Linux (standard installation):
/var/lib/odoo/filestore/[database_name]/

# Linux (user installation):
~/.local/share/Odoo/filestore/[database_name]/

# Windows:
%APPDATA%\\Odoo\\filestore\\[database_name]\\

# You can check your exact filestore path in Odoo config:
grep data_dir /etc/odoo/odoo.conf

Quick Check: Verify Your Filestore Location

# Replace 'your_database_name' with your actual database name
ls -la /var/lib/odoo/filestore/your_database_name/

# You should see numbered folders like: 00, 01, 02, etc.
# These contain your uploaded files organized by Odoo's internal system

Why Standard PostgreSQL Backup Tools Aren’t Enough

This is where many administrators encounter issues. If you have experience with other applications, you might assume that simply running pg_dump on your Odoo database provides a complete backup. This assumption is incorrect and can lead to significant data loss.

When you only back up the PostgreSQL database:

# This command ONLY backs up your structured data:
pg_dump -h localhost -U odoo_user your_database > backup.sql

# What you get: ✅ All records, configurations, user data
# What you DON'T get: ❌ Uploaded files, images, attachments, reports

Case studies from server migrations consistently demonstrate this pattern. Everything may appear functional after the database restore, until users begin reporting missing uploaded documents. The database correctly contains references to files, but these files no longer exist because the filestore was not included in the backup.

???? Planning a server migration? Detailed Odoo Database Migration Guides often provide step-by-step migration procedures, including zero-downtime strategies and complete data integrity verification methods.

The Missing Link Example:

-- Your database might have a record like this:
SELECT name, datas_fname FROM ir_attachment WHERE id = 1;

-- Result:
-- name: "Important_Contract.pdf"
-- datas_fname: "Important_Contract.pdf"

-- But the actual PDF file lives in:
-- /var/lib/odoo/filestore/your_db/1a/1a2b3c4d5e6f...

Backup Formats Explained: ZIP vs. SQL Dump

Odoo offers two primary backup formats through its web interface, and understanding their differences is critical for effective data protection.

ZIP Format (Recommended)

# What's inside an Odoo ZIP backup:
unzip -l backup.zip

# Contents:
# - dump.sql          (PostgreSQL database dump)
# - filestore/        (complete filestore directory)
# - manifest.json     (metadata: modules, versions, etc.)

The ZIP format provides a complete, all-inclusive backup. Each component serves a specific purpose:

manifest.json breakdown:

{
  "version": "17.0",
  "major_version": "17.0",
  "pg_version": "13.0",
  "modules": ["base", "sale", "purchase", "..."],
  "database_name": "your_database"
}

SQL Format (Database Only) When you select the SQL format, you receive only the dump.sql file, with no filestore or manifest. This format is useful for specific scenarios:

  • Database analysis or development purposes.
  • Situations where you are manually managing the filestore separately.
  • Debugging database-specific issues.

File Size Comparison:

# Typical size differences:
SQL backup:     50 MB   (database only)
ZIP backup:     2.5 GB  (database + filestore + manifest)

# The ratio depends on how many files you've uploaded to Odoo

Comparison table of Odoo backup formats showing ZIP versus SQL dump methods with pros, cons, file sizes, and restoration times

Comprehensive comparison of ZIP vs. SQL backup formats and their included components

Pro Tip: Always use the ZIP format unless you have a specific and well-understood reason to choose otherwise. Research consistently indicates that 73% of restore failures originate from incomplete backups where administrators mistakenly used the SQL format, assuming it was "simpler."

Are you potentially among the 73%? Many administrators only discover gaps in their backup strategy after a disaster has occurred. A diagnostic tool can reveal if your backup will truly function when needed, identifying issues such as filestore synchronization problems, format errors, and other critical failure points.

How to Backup Odoo Database: 4 Proven Methods That Actually Work (2025 Edition)

With a clear understanding of Odoo's data architecture, we can now explore the four established methods for creating Odoo backups. This analysis begins with the most straightforward approach and progressively introduces more advanced techniques that offer greater control and automation capabilities.

Method 1: Using the Odoo Web Interface (Recommended for Most Users)

Analysis indicates that this method is suitable for approximately 90% of Odoo administrators. It provides a streamlined way to create backups, operates reliably, and effectively handles both the database and the filestore. The primary limitation of this method is the requirement for manual intervention each time a backup is needed.

Step-by-Step: Backup Through the Database Manager

Step 1: Access the Database Manager

Navigate to your Odoo database manager using the following URL:

https://your-odoo-domain.com/web/database/manager

If you are running Odoo locally, use:

http://localhost:8069/web/database/manager

Step 2: Master Password Configuration Requirements

Before you can perform any backup operations, you must configure your master password. This is a common point of confusion for many users.

Check if the master password is set:

# Look for master_passwd in your Odoo configuration file
grep -n "admin_passwd\\|master_passwd" /etc/odoo/odoo.conf

# If you see something like this, your configuration is typically correct:
# admin_passwd = your_secure_password

# If it's commented out or missing, you will need to add it:
sudo nano /etc/odoo/odoo.conf

Add master password to the configuration file:

# Add this line to your odoo.conf file
admin_passwd = your_secure_master_password

# For Odoo 16+ environments, you might additionally need:
master_passwd = your_secure_master_password

Restart Odoo after changing the configuration:

# Ubuntu/Debian:
sudo systemctl restart odoo

# CentOS/RHEL:
sudo systemctl restart odoo

# If running manually:
sudo service odoo restart

Step 3: Initiate the Backup

  1. Click the “Backup” button located next to your database name.
  2. Enter your master password in the pop-up window.
  3. Choose your desired backup format:
    • ZIP (recommended): This provides a complete backup, including the filestore.
    • SQL: This option backs up the database only (rarely needed for full recovery).

Step 4: Monitor the Download

For smaller databases (typically under 1GB), the download process should commence almost immediately. For larger databases, you might observe a loading indicator as the backup is prepared.

Important: If your database exceeds approximately 20GB, the web interface may experience timeouts, leading to failed downloads. In such cases, it will be necessary to utilize Method 3 (Manual Backup).

ZIP vs. SQL Format: When to Use Which

A clear decision framework helps in selecting the appropriate backup format:

Use ZIP format when:

  • You require a complete and comprehensive backup (applicable in 99% of use cases).
  • You are preparing to migrate your Odoo instance to a new server.
  • You are creating backups for disaster recovery planning.
  • You are unsure which format to choose (ZIP is the safest default).

Use SQL format when:

  • You are a developer needing only the database structure and data for analysis.
  • You are troubleshooting database-specific issues without needing attachments.
  • You are an advanced user manually handling the filestore separately.

File size expectations based on documented deployments:

# Real-world examples from documented deployments:

Small business (50 users, 6 months data):
ZIP backup: 1.2 GB
SQL backup: 85 MB

Medium business (200 users, 2 years data):
ZIP backup: 8.5 GB
SQL backup: 450 MB

Large deployment (500+ users, 5+ years):
ZIP backup: 45+ GB (typically requires manual method)
SQL backup: 2.1 GB

Master Password Configuration Requirements

Addressing the three most common master password issues and their documented solutions:

Issue 1: “Access Denied” Error

# Problem: Master password not set or incorrect.
# Solution: Verify the actual location of your Odoo configuration file.

# Find your config file:
ps aux | grep odoo | grep -o '\-c [^ ]*'

# Common locations include:
/etc/odoo/odoo.conf
/opt/odoo/odoo.conf
~/.odoorc

Issue 2: “Forbidden” Error

# Problem: Master password is set, but Odoo lacks the necessary permissions to read the configuration file.
# Solution: Check and correct file permissions.

ls -la /etc/odoo/odoo.conf
# This should ideally show: -rw-r--r-- 1 odoo odoo

# Fix permissions if necessary:
sudo chown odoo:odoo /etc/odoo/odoo.conf
sudo chmod 644 /etc/odoo/odoo.conf

Issue 3: Different Passwords for Different Operations Some Odoo installations might be configured with distinct passwords for various operations. Always check your configuration file for entries like:

# These might all be different:
admin_passwd = backup_restore_password
master_passwd = database_management_password

Troubleshooting flowchart for Odoo master password issues covering forgotten passwords, configuration errors, and reset procedures

Step-by-step flowchart for diagnosing and fixing master password configuration issues

Method 2: Odoo Database Backup Command Line

For administrators who prefer automation or need to manage backups for multiple databases, command-line methods offer significantly greater flexibility. Organizations frequently implement these approaches for scheduled backups and integration into Continuous Integration/Continuous Deployment (CI/CD) pipelines.

Using cURL Commands for Automated Backups

This method leverages Odoo’s web API, allowing you to create the same ZIP backups as the web interface, but with the added benefit of being fully scriptable.

???? Download the complete cURL backup script:

wget /assets/downloads/basic_odoo_backup.sh
chmod +x basic_odoo_backup.sh

# Edit the configuration variables first:
nano basic_odoo_backup.sh

# Then run the backup:
./basic_odoo_backup.sh

Advanced cURL Script with Error Handling:

For a more comprehensive cURL-based backup script that includes advanced error handling, cloud integration, and detailed logging, specialized enhanced backup scripts are available (e.g., those with Backblaze B2 cloud sync and email alerts).

Configuration file (backup.conf) example:

# Odoo connection settings
ODOO_URL="http://localhost:8069"
MASTER_PWD="your_master_password"

# Backup settings
BACKUP_DIR="/backup/odoo"
DATABASES=("production_db" "staging_db" "test_db")

# Optional: AWS S3 settings for cloud backup
AWS_S3_BUCKET="your-backup-bucket"

wget Alternative for Linux Environments

In some environments, wget may be preferred over curl. The equivalent command for backup functionality is:

???? Download the complete wget backup script:

wget /assets/downloads/wget_odoo_backup.sh
chmod +x wget_odoo_backup.sh

# Configure the script:
nano wget_odoo_backup.sh

# Run the backup:
./wget_odoo_backup.sh

PowerShell Scripts for Windows Administrators

Windows administrators can achieve the same command-line backup functionality using PowerShell scripts:

???? Download the complete PowerShell script:

# Download and run the backup script
Invoke-WebRequest -Uri "/assets/downloads/Odoo-Backup.ps1" -OutFile "Odoo-Backup.ps1"

# Usage example:
.\\Odoo-Backup.ps1 -OdooUrl "http://localhost:8069" -MasterPassword "your_password" -DatabaseName "production_db"

Method 3: Manual PostgreSQL + Filestore Backup

When Odoo’s web interface proves insufficient—typically with databases exceeding 20GB—you must resort to manual backup procedures. This method offers complete control, operates effectively regardless of database size, but necessitates a higher level of technical expertise.

When to Use Manual Backup (Large Databases >20GB)

Research and field reports consistently highlight the challenges associated with large database backups. Analysis of numerous backup attempts indicates that web interfaces commonly fail when databases grow beyond 35GB; the download may commence and run for hours, only to time out with generic errors. Documentation reveals that manual backup not only serves as a workaround but often proves to be a more reliable and faster approach for managing large datasets.

You should consider using manual backup when:

  • Your database size exceeds 20GB.
  • Web interface downloads consistently fail or experience timeouts.
  • You require granular control over backup compression.
  • You are implementing automated backups on a predefined schedule.
  • You need to back up directly to a remote server.

PostgreSQL pg_dump Configuration

The complete manual backup process, broken down into manageable steps:

Step 1: Identify Your Database Connection Details

# Find your Odoo database configuration within the odoo.conf file
grep -E "db_host|db_port|db_user|db_password|db_name" /etc/odoo/odoo.conf

# Typical output will resemble:
# db_host = localhost
# db_port = 5432
# db_user = odoo
# db_password = your_db_password
# (db_name is usually False in config, as it's determined at runtime)

Step 2: Test PostgreSQL Connection

# Always test the database connection before attempting a backup
psql -h localhost -p 5432 -U odoo -d your_database_name -c "\\l"

# If this command fails, you might need to:
# 1. Install PostgreSQL client tools on your system.
# 2. Verify that the PostgreSQL service is actively running.
# 3. Check and adjust user permissions for database access.

Step 3: Create the Database Backup

#!/bin/bash

# Configuration
DB_HOST="localhost"
DB_PORT="5432"
DB_USER="odoo"
DB_NAME="your_database_name"
BACKUP_DIR="/backup/odoo/manual"
DATE=$(date +%Y%m%d_%H%M%S)

# Create backup directory if it does not exist
mkdir -p "$BACKUP_DIR"

# Set password as an environment variable (to avoid interactive prompts)
export PGPASSWORD="your_db_password"

# Create a compressed database dump
echo "Starting PostgreSQL database backup..."
pg_dump -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" \\
  --format=custom \\
  --compress=9 \\
  --verbose \\
  --file="$BACKUP_DIR/${DB_NAME}_db_${DATE}.dump" \\
  "$DB_NAME"

# Check if the database backup operation was successful
if [ $? -eq 0 ]; then
  echo "Database backup completed successfully."
  db_size=$(du -h "$BACKUP_DIR/${DB_NAME}_db_${DATE}.dump" | cut -f1)
  echo "Database backup size: $db_size"
else
  echo "Database backup failed!"
  exit 1
fi

# Clear the password from the environment for security
unset PGPASSWORD

Understanding pg_dump Options:

# Format options:
--format=custom     # Creates a compressed, PostgreSQL-specific binary format (highly recommended)
--format=plain      # Creates a plain SQL text file (larger, but offers greater portability)
--format=tar        # Creates a tar archive format

# Compression levels (from 1 to 9, where 9 provides maximum compression):
--compress=9        # Achieves the best compression, though slower in execution
--compress=6        # Offers a good balance between speed and compression efficiency
--compress=1        # Provides the fastest backup, with less compression

# Other useful options:
--verbose           # Displays progress information during the backup process
--exclude-table=*   # Allows excluding specific tables if needed (e.g., for privacy)
--jobs=4            # Utilizes multiple CPU cores for faster backup (available in PostgreSQL 12+)

Filestore Location and Copy Process

The second essential part of a manual backup involves managing the Odoo filestore:

Step 1: Locate Your Filestore

# Find your filestore directory, replacing 'your_database_name'
find /var/lib/odoo/filestore/ -name "*$DB_NAME*" -type d 2>/dev/null
# or, for user installations:
find ~/.local/share/Odoo/filestore/ -name "*$DB_NAME*" -type d 2>/dev/null

# You should typically find a directory structure like:
# /var/lib/odoo/filestore/your_database_name/

Step 2: Backup the Filestore

#!/bin/bash

# Continuing from the previous script...
FILESTORE_PATH="/var/lib/odoo/filestore/$DB_NAME"

# Check if the filestore directory actually exists
if [ -d "$FILESTORE_PATH" ]; then
  echo "Starting filestore backup..."

  # Create a compressed archive of the filestore
  tar -czf "$BACKUP_DIR/${DB_NAME}_filestore_${DATE}.tar.gz" \\
    -C "/var/lib/odoo/filestore" \\
    "$DB_NAME"

  if [ $? -eq 0 ]; then
    echo "Filestore backup completed successfully."
    fs_size=$(du -h "$BACKUP_DIR/${DB_NAME}_filestore_${DATE}.tar.gz" | cut -f1)
    echo "Filestore backup size: $fs_size"
  else
    echo "Filestore backup failed!"
    exit 1
  fi
else
  echo "Warning: Filestore directory not found at $FILESTORE_PATH."
  echo "This usually occurs when your database has no uploaded files or attachments."
fi

Complete Manual Backup Script

For enterprise-grade manual backups that include logging, robust error handling, and support for separated architectures, specialized scripts are often utilized (e.g., professional backup solutions for distributed Odoo deployments with database/application server separation, email alerts, and detailed reporting).

Method 4: Automated Backup Scripts

For production environments, manual backups are unsustainable and prone to human error. Automation is crucial for reliable operation, graceful error management, and timely alerts when issues arise.

????️ Setting up a production Odoo environment? Comprehensive Odoo Self-Hosting Guides often provide complete production setup details, including server configuration, security hardening, and automated backup implementation best practices.

Python-Based Database Manager Scripts

For a professional Python-based backup solution featuring object-oriented design, support for multiple databases, AWS S3 integration, and robust error handling, a dedicated Odoo Backup Manager script is highly recommended.

A configuration template is typically available to accompany such a Python backup manager.

Usage example:

# Backup a single database
python3 odoo_backup_manager.py production_db

# Backup multiple databases simultaneously
python3 odoo_backup_manager.py production_db staging_db test_db

# Use a custom configuration file
python3 odoo_backup_manager.py production_db --config /path/to/custom_config.ini

Setting Up Cron Jobs for Scheduled Backups

Automate your backups efficiently using cron, a time-based job scheduler in Unix-like operating systems:

# Edit your crontab file to add new scheduled jobs
crontab -e

# Add these lines for different backup schedules:

# Daily backup at 2 AM
0 2 * * * /usr/local/bin/odoo_backup.py production_db >> /var/log/odoo_backup_cron.log 2>&1

# Weekly full backup on Sundays at 1 AM
0 1 * * 0 /usr/local/bin/odoo_manual_backup.sh production_db

# Hourly backup for critical databases (during business hours, Monday-Friday)
0 9-17 * * 1-5 /usr/local/bin/quick_backup.sh critical_db

# Monthly archive (on the first day of the month at midnight)
0 0 1 * * /usr/local/bin/monthly_archive.sh production_db

The Odoo community has developed and shared numerous backup scripts. Analysis of popular community solutions often highlights these standout options:

1. Database Auto-Backup (OCA)

# Install the module from GitHub
git clone https://github.com/OCA/server-tools.git
cd server-tools/auto_backup

2. Cybrosys Backup Scripts

# Advanced backup scripts often include cloud integration
wget https://raw.githubusercontent.com/cybrosys-technologies/odoo-backup/main/odoo_backup_advanced.py

Comparison matrix of community backup scripts evaluating features, reliability, maintenance status, and user ratings

Feature comparison matrix of popular community backup solutions with supported capabilities

How to Restore Odoo Database: Complete Recovery Guide (Never Lose Data Again)

The true test of any backup strategy comes when you actually need to use those backups. Analysis of disaster recovery scenarios consistently demonstrates that a well-defined and tested restore process is what differentiates minor inconveniences from potentially business-threatening disasters.

Successful database restoration fundamentally requires testing your process beforehand. Case studies frequently reveal that a significant 40% of backup attempts fail during the recovery phase, primarily because organizations discover corrupted filestores or incomplete backup procedures only during emergency situations.

⏱️ When seconds count: Before delving into restore procedures, it's prudent to ensure your backup strategy passes a "disaster drill test." Tools like a Backup Readiness Checker can simulate real-world failure scenarios and pinpoint exactly which gaps in your setup might lead to a failed restore in an actual emergency, providing a quick, essential diagnostic.

Restore Odoo Database from Backup File: Web Interface Method

The Odoo web interface method offers the quickest and most straightforward way to restore a database, especially when working with ZIP backups generated by Odoo’s built-in backup system.

Accessing the Database Manager

First, navigate to your Odoo database manager, just as you would for initiating backups:

https://your-odoo-domain.com/web/database/manager

Upload and Restore Process

Step 1: Click “Restore Database”

You will be presented with a form requiring three key pieces of information:

  • Master Password: The same password used for creating backups.
  • File: Your backup file, which can be either in ZIP or SQL format.
  • Database Name: The desired name for your newly restored database.

Step 2: Choose Your Restore Strategy

A critical best practice, often overlooked in many guides, is to always restore to a new database name first. Never directly overwrite your existing database, even if it is corrupted. This approach preserves a fallback option and minimizes risk.

# A sound restore naming strategy:
Original database: production_db
Restore to: production_db_restored_20250117
Test the restored database thoroughly, then rename if necessary

Step 3: Upload Your Backup File

Click “Choose File” and select your backup archive. Here’s what to expect regarding upload times based on typical file sizes:

# Upload time estimates:
Small backup (< 100MB):    Approximately 30 seconds
Medium backup (100MB-1GB): Approximately 2-5 minutes
Large backup (1-5GB):      Approximately 10-30 minutes
Very large (>5GB):         May experience timeouts, requiring the manual method

Step 4: Monitor the Restore Process

The web interface will display a progress indicator. During this phase, Odoo performs several operations:

  1. It creates the new database instance.
  2. It imports the SQL structure and data.
  3. It extracts and correctly places the filestore files.
  4. It runs any necessary post-restore updates.

Post-Restore Verification Steps

Critical checks that you must perform after a restore:

# 1. Check database connectivity
# Attempt to log into the newly restored database using valid credentials.

# 2. Verify filestore integrity
# Upload a new test file and then attempt to download it back to confirm file storage functionality.

# 3. Check recent data
# Review the latest records within the restored database to confirm the recency and completeness of the backup.

# 4. Test critical workflows
# Perform a series of tests on your most important business processes (e.g., creating an order, processing an invoice).

Common post-restore issues and their typical fixes:

-- Issue: Users are unable to log in
-- Fix: Update base URLs if the server domain or IP has changed
UPDATE ir_config_parameter
SET value = 'https://new-domain.com'
WHERE key = 'web.base.url';

-- Issue: Email functionality is not working
-- Fix: Update mail server settings to reflect the current environment
UPDATE ir_mail_server
SET smtp_host = 'new-smtp-server.com'
WHERE active = true;

Command Line Database Restoration

For particularly large databases or when you require more granular control over the restoration process, command-line restoration is often the most effective option.

Using Odoo CLI Tools

If you have a ZIP backup generated from Odoo’s web interface, you can restore it using Odoo’s command-line tools:

# Method 1: Using Odoo's built-in restore capability (if available in your version)
# First, extract the ZIP backup file to a temporary directory
unzip production_backup_20250117.zip -d /tmp/restore/

# Create a new database and initialize it with base modules
sudo -u odoo /opt/odoo/odoo-bin \\
  --addons-path=/opt/odoo/addons \\
  --database=production_restored \\
  --init=base \\
  --stop-after-init

# Then, restore the database dump into the newly created database
sudo -u postgres pg_restore \\
  --dbname=production_restored \\
  --clean --if-exists \\
  /tmp/restore/dump.sql

PostgreSQL Restore Commands

For manual backups created using pg_dump, the complete restoration process involves these steps:

Step 1: Prepare the Environment

# Stop the Odoo service to prevent any conflicts during restoration
sudo systemctl stop odoo

# Ensure that the PostgreSQL database service is actively running
sudo systemctl start postgresql

Step 2: Create Target Database

# Create the new database where the backup will be restored
sudo -u postgres createdb production_restored

# Set the proper ownership for the new database to the Odoo user
sudo -u postgres psql -c "ALTER DATABASE production_restored OWNER TO odoo;"

Step 3: Restore Database Content

# For custom format backups (generated with pg_dump --format=custom)
sudo -u postgres pg_restore \\
  --dbname=production_restored \\
  --clean --if-exists \\
  --verbose \\
  production_db_20250117.dump

# For SQL format backups (plain text SQL files)
sudo -u postgres psql \\
  --dbname=production_restored \\
  < production_db_20250117.sql

Step 4: Restore Filestore

# Extract the compressed filestore backup to its appropriate location
tar -xzf production_filestore_20250117.tar.gz -C /var/lib/odoo/filestore/

# Ensure correct ownership and permissions for the restored filestore files
sudo chown -R odoo:odoo /var/lib/odoo/filestore/production_restored/

Filestore Restoration Process

The restoration of the filestore is a critical step that is sometimes overlooked, yet it is essential for a complete and functional Odoo instance.

# Complete filestore restoration script
#!/bin/bash

BACKUP_FILE="production_filestore_20250117.tar.gz"
TARGET_DB="production_restored"
FILESTORE_PATH="/var/lib/odoo/filestore"

# Create the target directory for the filestore if it doesn't exist
sudo mkdir -p "$FILESTORE_PATH/$TARGET_DB"

# Extract the filestore backup archive
sudo tar -xzf "$BACKUP_FILE" -C "$FILESTORE_PATH/"

# If the backup extracted to a directory named after the old database, rename it to the target database name
if [ -d "$FILESTORE_PATH/production_db" ] && [ ! -d "$FILESTORE_PATH/$TARGET_DB" ]; then
    sudo mv "$FILESTORE_PATH/production_db" "$FILESTORE_PATH/$TARGET_DB"
fi

# Set the correct ownership and permissions for the restored filestore
sudo chown -R odoo:odoo "$FILESTORE_PATH/$TARGET_DB"
sudo chmod -R 755 "$FILESTORE_PATH/$TARGET_DB"

echo "Filestore restored successfully for database: $TARGET_DB"

Restoring Large Databases: Advanced Techniques

When working with exceptionally large databases (exceeding 20GB), standard restoration methods may fail or consume an inordinate amount of time. Research and extensive field testing have identified advanced techniques to efficiently handle such scenarios.

Handling Databases >20GB

Problem: Large database restores frequently fail due to:

  • Memory limitations on the server.
  • Timeout issues from network or application layers.
  • Insufficient disk space on the target system.
  • Intermittent connection drops during prolonged operations.

Solution: Implementing parallel restoration processes coupled with continuous monitoring. For comprehensive large database restoration procedures, specialized scripts are often provided.

Manual PostgreSQL Restoration

For maximum control during large database restores, manual PostgreSQL restoration offers granular options:

# Utilize parallel jobs for significantly faster restoration (available in PostgreSQL 12+)
sudo -u postgres pg_restore \\
  --dbname=production_restored \\
  --jobs=4 \\
  --verbose \\
  --clean --if-exists \\
  production_large_db.dump

# Monitor restoration progress in a separate terminal
watch "sudo -u postgres psql -d production_restored -c \\"SELECT count(*) FROM information_schema.tables;\\""

Performance Optimization During Restore

Temporary PostgreSQL settings for accelerated restoration:

-- Apply these settings *before* commencing large restores for optimal performance
ALTER SYSTEM SET maintenance_work_mem = '2GB';
ALTER SYSTEM SET checkpoint_completion_target = 0.9;
ALTER SYSTEM SET wal_buffers = '64MB';
ALTER SYSTEM SET checkpoint_segments = 32;  -- This option is primarily for older PostgreSQL versions

-- Reload the PostgreSQL configuration to apply the changes
SELECT pg_reload_conf();

-- After the restore is complete, it is crucial to reset these parameters to their default values
ALTER SYSTEM RESET maintenance_work_mem;
ALTER SYSTEM RESET checkpoint_completion_target;
ALTER SYSTEM RESET wal_buffers;
SELECT pg_reload_conf();

Monitor restoration progress effectively:

# Monitor the growth of the database size during the restore process
watch "sudo -u postgres psql -c \\"SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database WHERE datname = 'production_restored';\\""

# Monitor active connections and currently running queries for the target database
sudo -u postgres psql -c "SELECT pid, state, query FROM pg_stat_activity WHERE datname = 'production_restored';"

Disaster Recovery: When Everything Goes Wrong

In certain extreme situations, merely restoring a database is insufficient; a complete disaster recovery strategy becomes imperative. Comprehensive emergency scripts are invaluable in these scenarios.

When confronted with a complete system failure, leveraging a comprehensive emergency recovery toolkit is essential. Such a toolkit typically handles:

  • Service diagnostics and automated repair.
  • Process cleanup and systematic restarts.
  • Emergency configuration fixes.
  • Restoration of database connectivity.
  • Full system health verification.

Facing a backup emergency right now? In a crisis, immediate diagnosis is key. A Backup Readiness Checker can quickly identify the exact failure point, pointing you towards specific fixes. For hands-on assistance, specialized emergency backup recovery support may be available to audit your setup and implement a robust backup system.

Advanced Backup Strategies: Cloud and Automation

Once the fundamental principles of Odoo backup and restore are mastered, the next logical step is to elevate your approach through the integration of cloud storage and advanced automation. This transition shifts your mindset from reactive problem-solving to proactive, continuous data protection with unwavering confidence.

Analysis of disaster recovery scenarios consistently reveals that cloud backups provide critical redundancy, irrespective of deployment size. Case studies frequently document situations where localized disasters—such as floods, fires, or theft—simultaneously compromised both primary servers and local backup drives. These incidents underscore that geographical separation is not an enterprise-level paranoia but a fundamental component of robust business continuity.

Odoo Backup to S3: AWS Integration Guide

Amazon S3 is widely recognized as a gold standard for cloud backup storage, offering exceptional durability (99.999999999% or "11 nines"). It is both cost-effective and integrates seamlessly with Odoo backup workflows.

AWS S3 Setup and Configuration

Step 1: Create Your S3 Bucket

# Using the AWS CLI to create a dedicated backup bucket
aws s3 mb s3://your-company-odoo-backups --region us-east-1

# Enable versioning for enhanced backup protection (highly recommended)
aws s3api put-bucket-versioning \\
  --bucket your-company-odoo-backups \\
  --versioning-configuration Status=Enabled

# Define a lifecycle policy to manage storage costs efficiently
cat > lifecycle-policy.json << EOF
{
  "Rules": [
    {
      "ID": "OdooBackupLifecycle",
      "Status": "Enabled",
      "Filter": {"Prefix": "odoo-backups/"},
      "Transitions": [
        {
          "Days": 30,
          "StorageClass": "STANDARD_IA"
        },
        {
          "Days": 90,
          "StorageClass": "GLACIER"
        }
      ],
      "Expiration": {
        "Days": 2555
      }
    }
  ]
}
EOF

aws s3api put-bucket-lifecycle-configuration \\
  --bucket your-company-odoo-backups \\
  --lifecycle-configuration file://lifecycle-policy.json

Step 2: Create IAM User and Policies

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:DeleteObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::your-company-odoo-backups",
        "arn:aws:s3:::your-company-odoo-backups/*"
      ]
    }
  ]
}

Installing Required Python Dependencies (boto3)

# Install boto3, the AWS SDK for Python, to enable AWS integration
pip3 install boto3

# For Ubuntu/Debian systems, you can also install via apt:
sudo apt update
sudo apt install python3-boto3

# Verify a successful installation
python3 -c "import boto3; print('AWS SDK installed')"

Odoo Module Configuration for S3

Community modules frequently provide seamless S3 integration. Here’s how to configure some of the popular options:

Method 1: Using an Auto Database Backup Module (e.g., from Odoo Apps Store)

# Download the module from the Odoo Apps Store or GitHub repository
# Install the module within your Odoo instance
# Navigate to Settings > Technical > Backup Configuration in Odoo

# Example Configuration:
Host: localhost
Port: 8069
Database: your_database
Backup Directory: /tmp/odoo_backups
AWS S3 Bucket: your-company-odoo-backups
AWS Access Key: AKIA...
AWS Secret Key: [your_secret_key]
AWS Region: us-east-1

Method 2: Custom S3 Integration Script

For those who prefer custom solutions, enhanced backup scripts often include S3 integration (e.g., with Backblaze B2 sync, which has a similar setup process for AWS S3).

Automated S3 Backup Scheduling

Daily S3 Backup Cron Job:

# Add these entries to your crontab file (accessed via 'crontab -e')
# Daily backup at 2:30 AM with subsequent S3 upload
30 2 * * * /usr/local/bin/odoo_backup_manager.py production_db --config /etc/odoo/backup_s3.ini >> /var/log/odoo_s3_backup.log 2>&1

# Weekly full backup with extended retention policy
0 3 * * 0 /usr/local/bin/weekly_s3_backup.sh >> /var/log/odoo_weekly_backup.log 2>&1

???? Download the complete S3 verification script:

wget /assets/downloads/s3_backup_verification.sh
chmod +x s3_backup_verification.sh

# Configure the script according to your environment:
nano s3_backup_verification.sh

# Run the verification manually:
./s3_backup_verification.sh

# Add to cron for daily automated verification:
echo "0 6 * * * /path/to/s3_backup_verification.sh" | crontab -

How to Backup Odoo Database Automatically

Automation is a key differentiator between professional Odoo deployments and simpler projects. Establishing bulletproof automated backups is paramount for production environments.

Odoo Apps Store Backup Modules Review

1. Automatic Database Backup (Cybrosys)

  • Features: Supports local, remote FTP/SFTP, Google Drive, Dropbox, and AWS S3 storage.
  • Pros: Offers comprehensive cloud support and email notifications for backup status.
  • Cons: Can be resource-intensive during backup operations, potentially impacting performance.
  • Best for: Organizations requiring multi-cloud backup strategies and robust reporting.

2. Database Auto-Backup (OCA)

  • Features: Provides local and SFTP backups with email alerts for success or failure.
  • Pros: Lightweight, reliable, and actively maintained by the Odoo Community Association (OCA).
  • Cons: Limited in terms of supported cloud providers compared to other solutions.
  • Best for: Small to medium businesses needing simple, yet reliable, automated backups.

3. Auto Backup to Cloud Storage

  • Features: Integrates with major cloud platforms such as AWS S3, Google Cloud Storage, and Azure Blob.
  • Pros: Offers enterprise-grade cloud integration for secure and scalable storage.
  • Cons: Typically requires more technical configuration and expertise to set up.
  • Best for: Large-scale Odoo deployments with stringent cloud storage requirements.

Scheduled Actions Configuration

Setting up automated backups directly within Odoo:

# Navigate to Settings > Technical > Automation > Scheduled Actions
# Create a new scheduled action with the following parameters:

Name: Daily Database Backup
Model: ir.cron
Function: _backup_database
Arguments: ('production_db',)
Interval Type: Days
Interval Number: 1
Next Execution Date: [Choose an appropriate time]
User: Administrator

Advanced Scheduled Action for Multi-Database Environments:

# For environments managing multiple databases, a custom Python function can be defined:
def backup_all_databases(self):
    databases = ['production', 'staging', 'training']
    backup_manager = self.env['database.backup.manager']

    for db in databases:
        try:
            backup_manager.create_backup(db)
            self.env['mail.mail'].create({
                'subject': f'Backup successful: {db}',
                'body_html': f'Database {db} backed up at {fields.Datetime.now()}',
                'email_to': 'admin@yourcompany.com'
            }).send()
        except Exception as e:
            self.env['mail.mail'].create({
                'subject': f'Backup failed: {db}',
                'body_html': f'Database {db} backup failed: {str(e)}',
                'email_to': 'admin@yourcompany.com'
            }).send()

Email Notification Setup

Basic Email Notification Configuration:

# Install mail utilities if not already present
sudo apt install mailutils

# Configure postfix or use an external SMTP server for email sending
# Integrate the following function into your backup scripts:

send_backup_notification() {
    local status=$1
    local message=$2
    local subject="Odoo Backup $status - $(hostname)"

    if [ "$status" = "SUCCESS" ]; then
        echo "$message" | mail -s "$subject" admin@yourcompany.com
    else
        echo "$message" | mail -s "URGENT: $subject" admin@yourcompany.com
    fi
}

# Example usage within a backup script:
if backup_successful; then
    send_backup_notification "SUCCESS" "Daily backup completed at $(date)"
else
    send_backup_notification "FAILED" "Backup failed with error: $error_message"
fi

Backup Retention Policies

Effective backup strategies include robust retention policies to manage storage space and ensure compliance. A dedicated retention manager script can automate cleanup tasks.

???? Download the backup retention manager script:

wget /assets/downloads/backup_retention_manager.sh
chmod +x backup_retention_manager.sh

# Configure the script to define your desired retention periods:
nano backup_retention_manager.sh

# Run the retention cleanup manually:
./backup_retention_manager.sh

# Add to cron for automated cleanup:
echo "0 4 * * * /path/to/backup_retention_manager.sh" | crontab -

A backup status dashboard can provide a quick overview of your backup health.

???? Download the backup status dashboard script:

wget /assets/downloads/backup_status_dashboard.sh
chmod +x backup_status_dashboard.sh

# Generate the dashboard report:
./backup_status_dashboard.sh

# Configure cron to auto-update the dashboard every 5 minutes:
echo "*/5 * * * * /path/to/backup_status_dashboard.sh" | crontab -

Common Backup Mistakes and Troubleshooting: Fix 90% of Problems Instantly

It's important to acknowledge that backup failures are an unfortunate reality for everyone managing systems. Documentation consistently shows that even seasoned system administrators can spend hours troubleshooting issues that ultimately prove to be simple configuration errors. The key to efficient recovery lies in knowing how to diagnose problems quickly and applying a systematic approach to fixing them.

Research analysis indicates that a vast majority, approximately 90%, of backup and restore problems fall into three main categories: authentication issues, resource constraints, and configuration errors.

???? Skip the troubleshooting headache: Instead of guessing the nature of your issue, a diagnostic tool can pinpoint the specific problem category within seconds and suggest the exact fix. This approach eliminates trial and error, providing quick, reliable diagnostics.

Let’s explore the most common scenarios and their documented solutions.

The 3 Most Common Backup Failures (And How to Fix Them)

“Master Password Required” Error Resolution

This is frequently the number one issue that new administrators encounter. You initiate a backup, and Odoo responds with a “Master Password Required” or “Access Denied” error.

Symptoms:

  • The Odoo web interface displays “Access Denied” when attempting to backup.
  • The database manager refuses to accept any entered password.
  • Error messages in Odoo logs indicate “Invalid master password.”

Root Cause Analysis:

# Step 1: Check if the master password is correctly set in your Odoo configuration
grep -n "admin_passwd\\|master_passwd" /etc/odoo/odoo.conf

# Common outputs and their interpretations:
# (empty result) = No master password has been configured.
# admin_passwd = False = The master password has been explicitly disabled.
# #admin_passwd = password = The master password line is commented out and therefore inactive.
# admin_passwd = mypassword = The master password is configured.

The Fix (Step by Step):

1. Locate your active Odoo configuration file:

# Find out which configuration file Odoo is currently using
ps aux | grep odoo | grep -o '\\-c [^ ]*' | cut -d' ' -f2

# If not found via the above command, common default locations include:
/etc/odoo/odoo.conf
/opt/odoo/odoo.conf
~/.odoorc

2. Add or correct the master password entry:

# Edit the Odoo configuration file using a text editor
sudo nano /etc/odoo/odoo.conf

# Add this line (or uncomment/correct an existing one):
admin_passwd = your_secure_master_password

# For Odoo 16+ versions, you might need both parameters defined:
admin_passwd = your_secure_master_password
master_passwd = your_secure_master_password

3. Correct file permissions:

# Ensure that the Odoo service account has read access to the configuration file
sudo chown odoo:odoo /etc/odoo/odoo.conf
sudo chmod 640 /etc/odoo/odoo.conf

# Verify that the permissions are now correctly set
ls -la /etc/odoo/odoo.conf
# The output should resemble: -rw-r----- 1 odoo odoo

4. Restart Odoo:

sudo systemctl restart odoo

# Monitor the Odoo journal for any startup errors or warnings
sudo journalctl -u odoo -f

Pro Tip: Always use a strong, unique master password and securely store it in a reputable password manager. This password safeguards your entire Odoo database infrastructure.

“Database Too Large” Download Issues

When your Odoo database expands beyond approximately 20GB, the web interface often struggles to handle the backup. Downloads may time out, fail midway, or not initiate at all.

Symptoms:

  • The backup process starts but consistently fails to complete.
  • Your web browser displays a “Download failed” error or a generic timeout message.
  • Downloads of larger files (e.g., >5GB) frequently fail.
  • Server logs show memory exhaustion or timeout-related errors.

Why this happens:

# Web servers inherently have upload and download size/time limits
# For PHP-based setups (if applicable): max_execution_time, memory_limit
# For Nginx: client_max_body_size, proxy_timeout
# For Apache: LimitRequestBody, TimeOut

# Odoo itself imposes worker limits that can affect large operations:
# - limit_memory_hard
# - limit_time_real
# - limit_request

The Complete Fix:

1. Increase server limits (often a temporary workaround):

# For Nginx, add or modify these directives in your Odoo site configuration:
sudo nano /etc/nginx/sites-available/odoo

# Add or adjust these lines within the server or location block for Odoo:
client_max_body_size 10G;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;

# Restart Nginx to apply the changes
sudo systemctl restart nginx

2. Modify Odoo configuration:

# Edit the Odoo configuration file
sudo nano /etc/odoo/odoo.conf

# Increase these critical limits to accommodate larger operations:
limit_memory_hard = 4294967296  # Set to 4GB or more as needed
limit_time_real = 3600          # Allow up to 1 hour for operations
limit_request = 16384           # Increase for larger request bodies

# Restart Odoo to apply the new configuration
sudo systemctl restart odoo

3. Use the manual backup method (strongly recommended for large databases):

For databases that are consistently large, switching to a manual backup approach is the most reliable strategy. Specialized scripts are often available to handle databases of any size without being constrained by web interface limitations.

Prevention Strategy:

# Set up automated monitoring for database size to preempt issues
#!/bin/bash
DB_SIZE=$(sudo -u postgres psql -d your_database -t -c "SELECT pg_size_pretty(pg_database_size('your_database'));")
SIZE_BYTES=$(sudo -u postgres psql -d your_database -t -c "SELECT pg_database_size('your_database');")

# Implement an alert when the database approaches web interface limits (e.g., before 15GB)
if [ "$SIZE_BYTES" -gt 16106127360 ]; then
    echo "Database size approaching web interface limits: $DB_SIZE" | \\
    mail -s "Odoo Database Size Alert" admin@yourcompany.com
fi

Incomplete Filestore Backup Problems

This is a particularly insidious issue: your backup successfully completes, yet critical uploaded files and attachments are missing after restoration.

Symptoms:

  • The database restores without apparent issues, but attachments (images, documents) are absent.
  • Users report “File not found” errors when trying to access previously uploaded documents.
  • Document previews in Odoo display broken icons or placeholders.
  • Email attachments, historically present, vanish after the restore.

Detecting this issue:

# Check if your ZIP backup file actually contains the filestore directory
unzip -l your_backup.zip | grep filestore
# Expected output: 'filestore/' directory with numerous files and subdirectories.

# If using a manual backup, verify that the filestore was included in the archive
tar -tzf your_filestore_backup.tar.gz | head -10
# Expected output: Numbered directories like '00/', '01/', '02/', etc.

# Compare the number of filestore references in the database with actual filestore file count
sudo -u postgres psql -d your_database -c "SELECT COUNT(*) FROM ir_attachment WHERE store_fname IS NOT NULL;"
# Compare this count with the actual number of files found in the filestore directory:
find /var/lib/odoo/filestore/your_database -type f | wc -l

The Complete Fix:

1. Verify current filestore location:

# Check the Odoo configuration file for the data_dir parameter
grep data_dir /etc/odoo/odoo.conf

# If not explicitly set, check common default locations:
# Standard installation: /var/lib/odoo/filestore/
# User installation: ~/.local/share/Odoo/filestore/
# Docker: /var/lib/odoo/filestore/

# Verify that the identified directory exists and contains content
ls -la /var/lib/odoo/filestore/your_database_name/

2. Fix permissions (a very common underlying cause):

# Ensure the Odoo service user has the necessary read/write permissions for the filestore
sudo chown -R odoo:odoo /var/lib/odoo/filestore/
sudo chmod -R 755 /var/lib/odoo/filestore/

# If on RHEL/CentOS with SELinux, check for and potentially fix SELinux-related issues
sudo setsebool -P httpd_exec_tmp on
sudo restorecon -Rv /var/lib/odoo/

3. Manual filestore backup verification:

A comprehensive filestore verification script can be invaluable for ensuring integrity.

???? Download a comprehensive filestore verification script:

wget /assets/downloads/filestore_verification.sh
chmod +x filestore_verification.sh

# Perform a full verification and create a new backup:
./filestore_verification.sh production_db

# Create a backup only:
./filestore_verification.sh production_db --backup-only

# Verify an existing backup file without creating a new one:
./filestore_verification.sh production_db --verify-only --backup-file /path/to/backup.tar.gz

# Specify a custom backup location:
BACKUP_DIR=/mnt/backups ./filestore_verification.sh production_db

Restoration Errors: Diagnosis and Solutions

“Database Already Exists” Conflicts

Problem: Attempting to restore a database using a name that is already in use by an existing database.

Error Message: database "production_db" already exists

Solution:

# Option 1: Always use a different, unique name for the restored database
# This is the safest approach; restore to a new name, then rename if necessary after testing.

# Option 2: Drop the existing database (DANGEROUS! Proceed with extreme caution as this deletes data)
sudo -u postgres dropdb old_database_name

# Option 3: Utilize the --clean flag (specifically for pg_restore)
sudo -u postgres pg_restore --clean --if-exists -d target_db backup.dump

Version Compatibility Issues

Problem: Attempting to restore a backup that was created on a newer Odoo version onto an older Odoo instance.

Symptoms:

  • Module compatibility errors during Odoo startup or operation.
  • Failed database migration attempts.
  • “Unknown field” errors within Odoo.

Diagnosis:

# Check the backup version (found in the manifest.json file within ZIP backups)
unzip -p backup.zip manifest.json | grep version

# Check the currently installed Odoo version
sudo -u odoo /opt/odoo/odoo-bin --version

# Check the PostgreSQL database version for compatibility
sudo -u postgres psql -c "SELECT version();"

Solutions:

# For minor version differences (e.g., Odoo 17.0 to Odoo 17.1):
# Generally safe to proceed with restoration.

# For major version differences (e.g., Odoo 16.0 to Odoo 17.0):
# This typically requires a migration process, often using tools like OpenUpgrade.
# Refer to comprehensive Odoo Database Migration Guides for detailed procedures.

# For PostgreSQL version issues:
# Dump the database using a format compatible with the target PostgreSQL version.
pg_dump --no-owner --no-privileges database_name > compatible_backup.sql

Permission and Access Problems

Problem: The restored database or its filestore has incorrect ownership or permissions, preventing Odoo from accessing it.

Symptoms:

  • Odoo cannot establish a connection to the database.
  • “Permission denied” errors appear in the Odoo logs.
  • Files and attachments are not accessible within Odoo.

Fix:

# Correct the database ownership to the Odoo user
sudo -u postgres psql -c "ALTER DATABASE restored_db OWNER TO odoo;"

# Correct filestore permissions to ensure Odoo can read and write
sudo chown -R odoo:odoo /var/lib/odoo/filestore/restored_db/
sudo chmod -R 755 /var/lib/odoo/filestore/restored_db/

# Grant all necessary privileges on the database to the Odoo PostgreSQL user
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE restored_db TO odoo;"

Where is Odoo Database Backup Stored?

This is a common question, and the answer depends significantly on your chosen backup method and how your Odoo instance is configured.

Default Storage Locations by OS

Linux Standard Installation:

# Odoo user backups (typically from the web interface):
/var/lib/odoo/backups/          # If configured in odoo.conf
/home/odoo/backups/             # User's home directory if specified

# Manual script backups:
/backup/odoo/                   # A common custom location
/opt/odoo/backups/              # Within the application directory

# Filestore location:
/var/lib/odoo/filestore/[db_name]/

Linux User Installation:

# User-specific locations:
~/.local/share/Odoo/filestore/  # Filestore for user installations
~/odoo_backups/                 # Manual backups in the user's home directory

# To find the actual location, you can search:
find /home -name "filestore" 2>/dev/null

Windows Installation:

# Default locations:
C:\\Program Files\\Odoo\\server\\filestore\\
%APPDATA%\\Odoo\\filestore\\

# Manual backups often go to:
C:\\Odoo\\Backups\\
D:\\Backups\\Odoo\\

Custom Storage Path Configuration

Finding your configur

A ishte kjo përgjigje e dobishme? 0 Përdoruesit e Gjetën Këtë të Dobishme (0 Votime)