A free, reliable database backup solution for Odoo 20.0 with local and SFTP remote storage, automated scheduling, retention policies, and comprehensive monitoring.
- Local Storage: Store backups on local filesystem or network-mounted drives
- SFTP Remote Storage: Securely transfer backups to remote servers via SSH/SFTP
- Backup Formats: ZIP archives with or without filestore, or PostgreSQL dumps
- Integrity Verification: ZIP CRC checks, nonempty SQL validation, complete PostgreSQL archive parsing, and a recorded SHA-256 checksum
- Flexible Scheduling: Manual and scheduled requests are queued for a dedicated backup worker
- Retention Policies: Keep last N backups or retain for N days
- Automated Cleanup: Automatic removal of old backups based on retention policy
- Job Monitoring: Track backup history, status, duration, and file sizes
- Email Notifications: Get notified on backup success/failure
- Success Rate Tracking: Monitor backup reliability over time
- Store backups on local filesystem or network-mounted drives
- Disk space checking and monitoring
- Integrity verification
- Organized directory structure with date-based folders
- High-performance transfers powered by AsyncSSH
- Password-based authentication
- Automatic remote directory creation
- Upload verification (file size check)
- Configurable connection and transfer timeouts
- Remote disk space monitoring
- Two-tier access control (User and Administrator)
- Granular model-level permissions
- System user for automated operations
- Administrator-only access to SFTP passwords and transfer operations
- Local paths confined to the configured storage directory; verified uploads are published atomically with private file permissions
Credentials are protected by Odoo access permissions; the module does not encrypt them in the database. ZIP/dump validation and checksums detect archive problems but do not replace a restore test. SFTP upload verification compares file sizes.
The list ships inside the module folder, as database_ultimate_backup_lite/requirements.txt, so it is also included in the module download. Install it with the same Python (or virtual environment) that runs Odoo:
pip install -r /path/to/addons/database_ultimate_backup_lite/requirements.txtOn Odoo.sh, requirements files inside module folders are not read: copy the lines of database_ultimate_backup_lite/requirements.txt into the requirements.txt of the folder that contains the module (usually the repository root).
The manifest's external_dependencies declare the minimum AsyncSSH version, so Odoo refuses to install or upgrade the module while it is missing or too old. Checking that version requires the packaging library, which is included in the requirements file.
- Copy the
database_ultimate_backup_litefolder to your Odoo addons directory - Update the apps list: Go to Apps > Update Apps List
- Search for "Database Ultimate Backup Lite"
- Click Install
Assign users to backup groups:
- Settings > Users & Companies > Users
- Select a user and go to the "Database Backup" tab
- Assign appropriate group:
- User: View backup configurations and jobs (read-only access)
- Administrator: Full access to create, modify, and execute backups
Navigate to Database Ultimate Backup Lite > Storage Providers > Local Storage and create a provider:
Name: Local Backup Server
Backup Directory: /opt/odoo/backups
Check Disk Space: Yes (recommended)
Min Free Space: 5 GB
Navigate to Database Ultimate Backup Lite > Storage Providers > SFTP Storage and create a provider:
Name: Remote Backup Server
Hostname: backup.example.com
Port: 22
Username: backup_user
Password: ********
Remote Directory: /home/backups/odoo
Create Remote Directories: Yes
Use the Test Connection button to verify the provider is configured correctly.
Navigate to Database Ultimate Backup Lite > Backup Configurations > Create
Name: Daily Production Backup
Database: [automatically populated with current database]
Backup Format: ZIP Archive
Include Filestore: Yes
Storage Providers:
- Select your local and/or SFTP storage providers
Retention Policy: Keep Last N Backups
Number of Backups to Keep: 7
Options:
- Verify Backup Integrity: Yes
- Notify on Failure: Yes
Notification Emails: [email protected]
Click Save.
- Click the Test Providers button to verify all providers are accessible
- Click Create Backup Now to queue a manual test backup
- Open Backup Jobs and refresh to see the completed result, logs and SHA-256 checksum
- Verify the backup file exists in your storage location
The Database Ultimate Backup Lite Job Queue scheduled action is enabled on installation and processes pending jobs every minute. Odoo cron workers must be running. Uploads remain sequential. Repeated requests for the same configuration are rejected while a job is pending or running; Retry Backup creates a new job and preserves the previous attempt.
The scheduler has a daily interval and is disabled initially. Activate it when your configuration is ready.
To customize the schedule:
- Go to Settings > Technical > Automation > Scheduled Actions
- Search for "Database Ultimate Backup Lite Scheduler"
- Edit the Execute Every field to your preferred interval
- Set the Next Execution Date if needed
- Enable the scheduled action
Active backup configurations will automatically run according to the cron schedule.
| Format | Description | Use Case |
|---|---|---|
| ZIP Archive + filestore | Complete backup including database and attachments | Full system backups, recommended for production |
| ZIP Archive without filestore | Database backup packaged as a ZIP without attachments | Smaller ZIP backups when attachments are backed up separately |
| PostgreSQL Dump | PostgreSQL custom-format dump, no filestore | Database-only backup restored with pg_restore |
Odoo 20's database manager accepts ZIP backups. Restore a .dump file into an empty database with pg_restore --no-owner --dbname=restored_db backup.dump. Custom dumps contain no filestore, so restore matching file-backed attachments separately if needed.
| Policy | Description | Example |
|---|---|---|
| Keep Last N Backups | Maintains the most recent N backups | Keep last 7 backups = 1 week of daily backups |
| Keep for N Days | Retains recent backups and always preserves the newest known copy | Keep 30 days, plus the latest copy if all are older |
| Keep All Backups | Disables automatic deletion for this configuration | Archive without automatic retention |
Retention only deletes successful uploads recorded for the current configuration and destination. Untracked files, unknown dates and ambiguous legacy locations are preserved. Keep the job history: deleting it also removes the evidence used to identify owned copies. Cleanup runs after successful or partially successful backups and through the cleanup scheduled action.
Customize backup filenames using variables:
{database}- Database name{timestamp}- Timestamp including microseconds{format}- File extension (zipordump)
Default: {database}_{timestamp}.{format}
A unique suffix is always appended to prevent a repeated filename template from overwriting an earlier run. Partial uploads remain Warning and use the failure email preference, even when success emails are disabled.
Backups, manual ones included, run in Odoo's cron worker, which is bound by limit_time_real_cron; when that option is not set, Odoo applies limit_time_real (120 seconds by default). On large databases the worker is killed before the dump or upload finishes. Adjust odoo.conf and restart Odoo; these values suit a 20-50 GB backup:
limit_time_cpu = 5400
limit_time_real_cron = 10800
limit_memory_soft = 2147483648
limit_memory_hard = 2684354560- Time: aim for 2-3 times the duration your backup jobs actually take (see the job's Duration).
- Memory: keep both memory limits at least at Odoo's defaults (2 GB soft, 2.5 GB hard). They limit virtual memory per worker, not physical RAM; lower values can make backups fail with "Cannot allocate memory".
- Comments:
odoo.confonly accepts comments on their own line (starting with;or#). A line such aslimit_memory_hard = 2684354560 ; 2.5 GBkeeps the comment as part of the value and Odoo fails to start.
"No storage providers configured"
- Configure at least one storage provider (Local or SFTP) before creating backups
- Ensure the provider is set to Active
"Backup failed: disk space"
- Check available disk space on backup destinations
- Reduce retention count or days
- Run cleanup manually to free space
"AsyncSSH library not found"
- Install the requirements:
pip install -r /path/to/addons/database_ultimate_backup_lite/requirements.txt - Restart the Odoo service after installation
"Cannot allocate memory" or the backup stops after a few minutes
- The cron worker reached
limit_memory_hardorlimit_time_real_cron; see Odoo Configuration for Large Databases
"SFTP connection failed"
- Verify hostname, port, username, and password
- Ensure the SFTP server is reachable from the Odoo server
- Check firewall rules for SSH port (default: 22)
- Use the Test Connection button to diagnose issues
"Scheduled backups not running"
- Verify the cron job is active: Settings > Technical > Scheduled Actions
- Check backup configuration is marked as Active
- Review system logs for cron execution errors
Upgrade to Database Ultimate Backup (Full Edition) for enterprise-grade multi-cloud support:
- AWS S3 - Storage classes, encryption, versioning
- Azure Blob Storage - Storage tiers, geo-redundancy
- Google Cloud Storage - Flexible classes, KMS encryption
- DigitalOcean Spaces - Cost-effective cloud storage
- Parallel Uploads - Upload to multiple providers simultaneously
- Server-side Encryption - AES256 and KMS encryption
This module is licensed under the MIT License. See LICENSE file for details.
- René Hechavarría
- Odoo 20.0 Community/Enterprise Framework
- AsyncSSH for high-performance SFTP transfers
- Strategy design pattern for extensibility
Database Ultimate Backup Lite - Free local & SFTP backup solution for Odoo 20.0