{"id":22898419,"url":"https://github.com/bbtsoftware/docker-mssql-backup","last_synced_at":"2025-10-14T20:11:36.203Z","repository":{"id":54208427,"uuid":"249705241","full_name":"bbtsoftware/docker-mssql-backup","owner":"bbtsoftware","description":"Docker image for periodic backups from a Microsoft SQL Server container","archived":false,"fork":false,"pushed_at":"2024-10-07T08:34:33.000Z","size":46,"stargazers_count":35,"open_issues_count":6,"forks_count":21,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-05-07T23:07:08.963Z","etag":null,"topics":["backup","docker","mssql"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbtsoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-03-24T12:42:16.000Z","updated_at":"2025-04-03T20:55:59.000Z","dependencies_parsed_at":"2024-03-18T10:32:20.640Z","dependency_job_id":"5b20ec6e-e7de-4ed8-80b6-03234e024f1b","html_url":"https://github.com/bbtsoftware/docker-mssql-backup","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbtsoftware%2Fdocker-mssql-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbtsoftware%2Fdocker-mssql-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbtsoftware%2Fdocker-mssql-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbtsoftware%2Fdocker-mssql-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbtsoftware","download_url":"https://codeload.github.com/bbtsoftware/docker-mssql-backup/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968118,"owners_count":21833251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker","mssql"],"created_at":"2024-12-14T00:32:03.570Z","updated_at":"2025-10-14T20:11:31.178Z","avatar_url":"https://github.com/bbtsoftware.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image for backup of Microsoft SQL Server\n\nDocker image to create regular backups of a [Microsoft SQL Server] image.\n\n## Information\n\n| Service | Stats                                                                                     |\n|---------|-------------------------------------------------------------------------------------------|\n| Docker  | [![Build](https://img.shields.io/docker/cloud/build/bbtsoftwareag/mssql-backup.svg?style=flat-square)](https://hub.docker.com/r/bbtsoftwareag/mssql-backup/builds) [![Pulls](https://img.shields.io/docker/pulls/bbtsoftwareag/mssql-backup.svg?style=flat-square)](https://hub.docker.com/r/bbtsoftwareag/mssql-backup) [![Stars](https://img.shields.io/docker/stars/bbtsoftwareag/mssql-backup.svg?style=flat-square)](https://hub.docker.com/r/bbtsoftwareag/mssql-backup) [![Automated](https://img.shields.io/docker/cloud/automated/bbtsoftwareag/mssql-backup.svg?style=flat-square)](https://hub.docker.com/r/bbtsoftwareag/mssql-backup/builds) |\n| GitHub  | [![Last commit](https://img.shields.io/github/last-commit/bbtsoftware/docker-mssql-backup.svg?style=flat-square)](https://github.com/bbtsoftware/docker-mssql-backup/commits/master) [![Issues](https://img.shields.io/github/issues-raw/bbtsoftware/docker-mssql-backup.svg?style=flat-square)](https://github.com/bbtsoftware/docker-mssql-backup/issues) [![PR](https://img.shields.io/github/issues-pr-raw/bbtsoftware/docker-mssql-backup.svg?style=flat-square)](https://github.com/bbtsoftware/docker-mssql-backup/pulls) [![Size](https://img.shields.io/github/repo-size/bbtsoftware/docker-mssql-backup.svg?style=flat-square)](https://github.com/bbtsoftware/docker-mssql-backup/) [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/bbtsoftware/docker-mssql-backup/blob/master/LICENSE) |\n\n## General\n\n| Topic  | Description                                                            |\n|--------|------------------------------------------------------------------------|\n| Image  | See [Docker Hub](https://hub.docker.com/r/bbtsoftwareag/mssql-backup). |\n| Source | See [GitHub](https://github.com/bbtsoftware/docker-mssql-backup).      |\n\n## Usage\n\nThis container can create backups on a [Microsoft SQL Server] container.\n\n**NOTE:**\nThe backup is written to a directory `/backup` inside the [Microsoft SQL Server] container, not to a volume in the backup container.\nFor using the cleanup feature attach the same `/backup` volume in the `bbtsoftwareag/mssql-backup` container.\n\n### Tags\n\n| Tag    | Description                                                                             | Size                                                                                                                  |\n|--------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| latest | Latest master build                                                                     | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/latest.svg?style=flat-square) |\n| 0.1.0  | Release [0.1.0](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.1.0)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.1.0.svg?style=flat-square)  |\n| 0.2.0  | Release [0.2.0](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.2.0)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.2.0.svg?style=flat-square)  |\n| 0.3.0  | Release [0.3.0](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.3.0)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.3.0.svg?style=flat-square)  |\n| 0.4.0  | Release [0.4.0](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.4.0)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.4.0.svg?style=flat-square)  |\n| 0.5.0  | Release [0.5.0](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.5.0)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.5.0.svg?style=flat-square)  |\n| 0.5.1  | Release [0.5.1](https://github.com/bbtsoftware/docker-mssql-backup/releases/tag/0.5.1)  | ![Size](https://shields.beevelop.com/docker/image/image-size/bbtsoftwareag/mssql-backup/0.5.1.svg?style=flat-square)  |\n\n### Configuration\n\nThese environment variables are supported:\n\n| Environment variable | Default value | Description                                                                                                                                                                                                                      |\n|----------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| DB_SERVER            | `mssql`       | Name or address of the database server to backup. Normally this should be the name of the [Microsoft SQL Server] service.                                                                                                        |\n| DB_USER              | `SA`          | User used to connect to the database server.                                                                                                                                                                                     |\n| DB_PASSWORD          |               | Password used to connect to the database server.                                                                                                                                                                                 |\n| DB_NAMES             |               | Names of the databases for which a backup should be created.                                                                                                                                                                     |\n| TZ                   |               | Timezone to use.                                                                                                                                                                                                                 |\n| CRON_SCHEDULE        | `0 1 * * sun` | Cron schedule for running backups. NOTE: There is no check if there's already a backup running when starting the backup job. Therefore time interval needs to be longer than the maximum expected backup time for all databases. |\n| BACKUP_CLEANUP       | `false`       | Set to \"true\" if you want to let the cronjob remove files older than $BACKUP_AGE days                                                                                                                                            |\n| BACKUP_AGE           | `7`           | Number of days to keep backups in backup directory                                                                                                                                                                               |\n| SKIP_BACKUP_LOG      | `false`       | Skip step to backup the transaction log .                                                                                                                                                                                        |\n| PACK                 |               | Possible values: `tar`, `zip`. If defined, compresses the output files into a single `.tar.gz` (or `zip`)-File.                                                                                                                  |\n| ZIP_PASSWORD         |               | Sets the password for the zip to the given value. Only works if `PACK` is set to `zip`                                                                                                                                           |\n| PUSH_REMOTE_MODE     |               | The possible values `move` or `copy` activates pushing the backup files to a mapped remote directory. The volume `remote` must be mapped.                                                                                        |\n| SMTP_HOST            |               | If this is set, email reporting is enabled by sending the results of the backup process to `MAIL_TO`. You pretty much have to define all the other `SMTP_*` variables, when the host is defined.                                 |\n| SMTP_PORT            |               | The port of the SMTP server                                                                                                                                                                                                      |\n| SMTP_USER            |               | The username used to login against the SMTP server                                                                                                                                                                               |\n| SMTP_PASS            |               | The password for connecting to the SMTP server                                                                                                                                                                                   |\n| SMTP_FROM            |               | The E-mail address from which mails should be sent from                                                                                                                                                                          |\n| SMTP_TLS             | `on`          | Whether TLS should be used when connecting to the SMTP server                                                                                                                                                                    |\n| MAIL_TO              |               | The target E-mail address for receiving mail reports                                                                                                                                                                             |\n\n## Examples\n\n### Docker Compose\n\nThe following example will create backups of the databases `MyFirstDatabaseToRestore` and `MySecondDatabaseToRestore`\nrunning inside the `db` container every day at 01.00 CEST and stores it in the `/storage/backup` directory on the host machine.\n\n```yaml\nversion: '3.7'\n\nservices:\n  db:\n    image: mcr.microsoft.com/mssql/server\n    volumes:\n      - /storage/backup:/backup\n    environment:\n      - ACCEPT_EULA=Y\n      - MSSQL_PID=Express\n      - SA_PASSWORD=MySecre(12)tPassword\n    networks:\n      - default\n  backup:\n    image: bbtsoftwareag/mssql-backup\n    # for using the cleanup feature, use the backup volume from db.\n    # volumes:\n    #   - /storage/backup:/backup\n    environment:\n      - TZ=Europe/Zurich\n      - DB_SERVER=db\n      - DB_USER=SA\n      - DB_PASSWORD=MySecre(12)tPassword\n      - \"DB_NAMES=\n          MyFirstDatabaseToRestore\n          MySecondDatabaseToRestore\"\n      - CRON_SCHEDULE=0 1 * * *\n    networks:\n      - default\n```\n\n### Example environment\n\nWe added a small docker environment in the [example](https://github.com/bbtsoftware/docker-mssql-backup/tree/develop/example)\nsubdirectory for `development` or `tests` with a own [readme](https://github.com/bbtsoftware/docker-mssql-backup/blob/develop/example/README.md) file.\n\n## Discussion\n\nFor questions and to discuss ideas \u0026 feature requests, use the [GitHub discussions on the BBT Software docker-mssql-backup repository](https://github.com/bbtsoftware/docker-mssql-backup/discussions).\n\n[![Join in the discussion on the BBT Software docker-mssql-backup repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/bbtsoftware/docker-mssql-backup/discussions)\n\n## Contributing\n\nContributions are welcome. See [Contribution Guidelines](CONTRIBUTING.md).\n\n[Microsoft SQL Server]: https://hub.docker.com/_/microsoft-mssql-server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbtsoftware%2Fdocker-mssql-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbtsoftware%2Fdocker-mssql-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbtsoftware%2Fdocker-mssql-backup/lists"}