odoo-backup is a stateless docker service that creates rotating backups of odoo and uploads them to any SFTP server. The image is based on python alpine and was coded to use minimal resources.
- Stateless backup service for odoo databases
- Upload backup to sftp target
- Set scheduling for backups
- Set maximum backups per day, month and year
- Set time based on your timezone
- Contributed by:
GABIT Marco Gantenbein - Docker Image:
gabitch/odoo-backup
ODOO_URL
*required - URL of odoo instance. For docker in the same network the container name could be used like "http://odoo:8069"ODOO_MASTER_PWD
*required - odoo master passwordODOO_DB_NAME
*required - name of odoo database to back upODOO_BACKUP_FORMAT
**optional - backup format zip or dump, default=zipSFTP_HOST
*required - sFTP server address as domain or IPSFTP_USER
*required - sFTP server userSFTP_PASSWORD
*required - sFTP server passwordSFTP_PORT
**optional - port of sFTP Server, default=22SFTP_PATH
**optional - path on sFTP Server, default="/"TZ
**optional, set timezone, default="UTC"BACKUP_TIME
**optional, start time for backup or time which daily backup should be preserved, default="02:00"BACKUP_EVERY_HOUR
**optional, set hours between the backups if hourly backup should be done, default=NoneHOURLY_BACKUP_KEEP
**optional, set count of hourly backups to keep (total hours = BACKUP_EVERY_HOUR * HOURLY_BACKUP_KEEP), default=4DAILY_BACKUP_KEEP
**optional, set count of daily backups to keep, default=30MONTHLY_BACKUP_KEEP
**optional, set count of monthly backups to keep, default=12YEARLY_BACKUP_KEEP
**optional, set count of yearly backups to keep (unlimited=-1), default=-1TEST_MODE
**optional, set TEST_MODE=True to directly execute backup without scheduling
- Add Multithreading support for backup durations of more than 1 hour
- Fix "No hostkey" error for reconnecting
- Fix "SSH session not active" error for huge backups. Add reconnect method with 3 retries
- Add HOURLY_BACKUP_KEEP as a new environment variable
- Add docstrings to script, class and methods
- Fix cleanup process with remaining backups
First relaese with all base functions and environment variables
None
- Add automated tests