PGDumper is an automated tool, designed to run inside a container, that handles running database backups (compressed text dumps via gzip) for a PostgreSQL database. It includes an internal scheduler and allows automatically uploading the generated backups to multiple remote destinations, while simultaneously supporting automatic retention mechanisms (deletion of obsolete backup files).
The supported destinations are:
Below is the list of all the variables read by the application through the .env file or container configuration.
PG_HOST (default: localhost) - The hostname of the PostgreSQL database.PG_PORT (default: 5432) - The port of the PostgreSQL daemon.PG_USER (default: postgres) - The user for the DB connection.PG_PASSWORD (default: postgres) - The user's password.PG_DBNAME (default: postgres) - The name of the database to backup.PG_SCHEMAS (Optional) - Comma-separated list of specific schemas (e.g., public,auth). If omitted, the tool backs up the entire database.BACKUP_DIR (default: local_backups) - The local folder where .sql.gz files are saved. This is normally mapped to a Docker volume.BACKUP_SCHEDULE_TIME (default: 03:00) - The daily time when the backup job is automatically executed (e.g., 03:00 for 3:00 AM).FORCE_IMMEDIATE_BACKUP (default: false) - If set to true, it immediately runs a dump when the container starts, temporarily bypassing the scheduler (useful for debugging or single executions).ENABLE_S3_BACKUP (default: false) - Enable or disable interaction with S3 by setting it to true.AWS_ACCESS_KEY_ID - Your AWS access key.AWS_SECRET_ACCESS_KEY - Your AWS access secret.AWS_REGION (default: eu-west-1) - The region where the bucket is located.S3_BUCKET_NAME - The name of the destination bucket where dumps will be saved.S3_PREFIX (default: backups/) - The S3 prefix (folder) where the files will be placed inside the bucket.ENABLE_FTPS_BACKUP (default: false) - Enable or disable upload to an FTPS server by setting it to true.FTPS_HOST - The IP address or domain name of the FTPS server.FTPS_PORT (default: 21) - The FTPS connection port.FTPS_USER - The username for FTP access secured via TLS.FTPS_PASSWORD - The password for the FTP account.FTPS_REMOTE_DIR (default: /backups) - The destination folder on the remote server for file uploads.ENABLE_FTP_BACKUP (default: false) - Enable or disable upload to a traditional FTP server by setting it to true.FTP_HOST - The IP address or domain name of the FTP server.FTP_PORT (default: 21) - The port of the conventional FTP server.FTP_USER - The FTP username.FTP_PASSWORD - The FTP user password.FTP_REMOTE_DIR (default: /backups) - The destination folder on the server.If the values are set to 0 (which is the default behavior), no backups will ever be automatically deleted. By entering a number of days > 0, upon the completion of a successful backup, the tool will clean up the various directories by deleting dump files older than the specified amount of days.
DAYS_TO_KEEP_LOCAL (default: 0) - How many days to keep the backups in the container/volume before deleting them.DAYS_TO_KEEP_S3 (default: 0) - How many days to retain the backups on AWS S3.DAYS_TO_KEEP_FTPS (default: 0) - How many days to keep the backup files on the FTPS server.DAYS_TO_KEEP_FTP (default: 0) - How many days to keep the backups on the FTP storage.Content type
Image
Digest
sha256:1fa289a26…
Size
74.2 MB
Last updated
5 months ago
docker pull superdell/pgdumper:1.0.0