Docker image which is suitable to run scheduled backup processes for PostgreSQL DBs
10K+
Docker image to do scheduled backups of PostgreSQL DBs
This Dockerfile can be used to do daily backups and cleanup archive with a policy like this:
You can have as many connections to backup as you want (maximum number is 99 though) and for each of it you need to have a config like this:
BACKUP_NAME_[1..99] - Name which will be used to generate backup files.SCHEDULE_[1..99] - Cron format for running backups (e.g. 23 */3 * * *). Default: 0 0 * * *BACKUP_DIR_[1..99] - Directory to keep backups. Default: /dataBACKUP_DB_HOST_[1..99] - DB host to backup. Default: localhostBACKUP_DB_PORT_[1..99] - DB port to backup. Default: 5432BACKUP_DB_NAME_[1..99] - DB name to backup. Default: template1BACKUP_DB_USER_[1..99] - DB use to backup. Default: postgresBACKUP_DB_PASSWORD_[1..99] - DB use to backup. Default: `` (empty string)BACKUP_OPTIONS_[1..99] - options pg_dump utility. Default: `` (empty string)SAFE_DAYS_[1..99] - Number of days when we keep one backup per each day. Default: 7SAFE_WEEKS_[1..99] - Number of weeks when we keep backup per each week. Default: 4SAFE_WEEK_DAY_[1..99] - Name of the Day of the Week to keep backup. Valid values: Monday,Tuesday, Wednesday,Thursday,Friday,Saturday,Sunday Default: MondaySAFE_MONTHS_[1..99] - Number of months when we keep one backup per each month. Default: 6SAFE_MONTH_DATE_[1..99] - Date of any month to keep backup. Valid values: 1-28. Default: 1In fact Docker container will have cron which will run pg_backup and proceed cleanup of old backups accordingly configs for each of provided connections.
Content type
Image
Digest
Size
111.1 MB
Last updated
over 9 years ago
docker pull paunin/pg-backupper