Sign inSign up

mierzwid/mssql-backups

By mierzwid

•Updated over 5 years ago

Image
0

78

mierzwid/mssql-backups repository overview

⁠Dedicated backup container

As an addition to the extended MS SQL image, there is a dedicated backup image that can be used together with the MS SQL image to perform maintenance tasks:

  1. backups
    • on-demand using: /backup.sh script: /backup.sh database-name
    • on-demand adding label (defaults to latest) to a backup file: /backup.sh database-name label
  2. uploading backups to a S3 bucket configured via env variables⁠:
    • AWS_CONFIG_FILE - path to the AWS-CLI configuration file
    • AWS_SHARED_CREDENTIALS_FILE - path to the AWS-CLI credentials file
    • AWS_S3_SSE_CUSTOMER_KEY - path to the customer key for SSE encryption of backups
    • AWS_S3_BUCKET_NAME - S3 bucket name
  3. periodical backups scheduled using cron:
    • ENABLE_PERIODIC_BACKUPS - set this variable to enable periodic backups - disabled by default
    • BACKUPS_CRON_SCHEDULE - configure schedule used by cron to run the backup task, defaults to 0 0 * * * (every day at midnight)
  4. restores
    • on-demand using: /restore.sh script - restores the latest backup
    • on-demand from the latest labeled backup, e.g.: /restore.sh database-name 0.0.1 will restore the latest backup with 0.0.1 label; it is also supported to pass the full backup name instead of a label
  5. restores directly from S3 bucket: /restore-from-s3.sh database-name backup-name

Please notice: In all enumerated cases database-name can be omitted (if used as the last parameter) or passed as empty string /backup.sh "" label (if used as a middle parameter) and this will default to the MSSQL_DATABASE variable.

Sample compose file with configured MS SQL Server and DB Backup container - tested against Docker Swarm: docker-compose-db-backup.yml⁠

Tag summary

Content type

Image

Digest

Size

188.9 MB

Last updated

over 5 years ago

docker pull mierzwid/mssql-backups:0.1.6