1+ #
2+ # Example for Microsoft SQL Server
3+ # upload with blobxfer to azure storage
4+ #
5+
6+ version : ' 2'
7+
8+ networks :
9+ example-mssql-blobxfer-net :
10+ name : example-mssql-blobxfer-net
11+
12+ services :
13+ example-mssql-s3-db :
14+ hostname : example-db-host
15+ image : mcr.microsoft.com/mssql/server:2019-latest
16+ container_name : example-mssql-s3-db
17+ restart : unless-stopped
18+ ports :
19+ - " 127.0.0.1:11433:1433"
20+ networks :
21+ example-mssql-blobxfer-net :
22+ volumes :
23+ - ./tmp/backups:/tmp/backups # shared tmp backup directory
24+ environment :
25+ ACCEPT_EULA : Y
26+ MSSQL_SA_PASSWORD : 5hQa0utRFBpIY3yhoIyE
27+ MSSQL_PID : Express
28+
29+ example-mssql-blobxfer-db-backup :
30+ container_name : example-mssql-blobxfer-db-backup
31+ # if you want to build and use image from current source
32+ # execute in terminal --> docker build -t tiredofit/db-backup-mssql-blobxfer .
33+ # replace --> image: tiredofit/db-backup-mssql
34+ # image: tiredofit/db-backup
35+ image : tiredofit/db-backup-mssql-blobxfer
36+ links :
37+ - example-mssql-s3-db
38+ volumes :
39+ - ./backups:/backup
40+ - ./tmp/backups:/tmp/backups # shared tmp backup directory
41+ # - ./post-script.sh:/assets/custom-scripts/post-script.sh
42+ environment :
43+ # - DEBUG_MODE=TRUE
44+ - DB_TYPE=mssql
45+ - DB_HOST=example-db-host
46+ # - DB_PORT=1488
47+ # - DB_NAME=ALL # [ALL] not working on sql server.
48+ # create database with name `test1` manually first
49+ - DB_NAME=test1 # Create this database
50+ - DB_USER=sa
51+ - DB_PASS=5hQa0utRFBpIY3yhoIyE
52+ - DB_DUMP_FREQ=1 # backup every 5 minute
53+ # - DB_DUMP_BEGIN=0000 # backup starts immediately
54+ - DB_CLEANUP_TIME=3 # clean backups they are older than 60 minutes
55+ - ENABLE_CHECKSUM=TRUE
56+ - CHECKSUM=SHA1
57+ - COMPRESSION=GZ
58+ - SPLIT_DB=FALSE
59+ - CONTAINER_ENABLE_MONITORING=FALSE
60+ # === S3 Blobxfer ===
61+ - BACKUP_LOCATION=blobxfer
62+ # Add here azure storage account
63+ - BLOBXFER_STORAGE_ACCOUNT={TODO Add Storage Name}
64+ # Add here azure storage account key
65+ - BLOBXFER_STORAGE_ACCOUNT_KEY={TODO Add Key}
66+ - BLOBXFER_REMOTE_PATH=docker-db-backup
67+ restart : always
68+ networks :
69+ example-mssql-blobxfer-net:
0 commit comments