Skip to content

Any idea why the backup is not running for me? #58

@myriad007

Description

@myriad007

I've added the backup to my mssql container but I am having trouble getting the backup to initiate. Here is my docker compose file:

version: "3.3"
services:
  server:
    environment:
      - ACCEPT_EULA=Y
      - TZ=America/Toronto
      - MSSQL_SA_PASSWORD=xx%xx&2jLr
      - MSSQL_PID=Express
      - MSSQL_BACKUP_DIR=/var/opt/mssql/backup
      - shm-size 1g
    ports:
      - 1433:1433
    volumes:
      - /mnt/data/mssql/data:/var/opt/mssql/data
      - /mnt/data/mssql/log:/var/opt/mssql/log
      - /mnt/data/mssql/secrets:/var/opt/mssql/secrets
      - /mnt/data/mssql/backup:/var/opt/mssql/backup
    container_name: sqlpreview
    hostname: sqlpreview
    image: mcr.microsoft.com/mssql/server:2022-preview-ubuntu-22.04
    user: root
    restart: unless-stopped
  backup:
    image: bbtsoftwareag/mssql-backup
    # for using the cleanup feature, use the backup volume from db.
    volumes:
      - /mnt/data/mssql/backup:/var/opt/mssql/backup
    environment:
      - TZ=America/Toronto
      - DB_SERVER=sqlpreview
      - DB_USER=SA
      - DB_PASSWORD=xx%xx&2jLr
      - DB_NAMES=school2021_1
      - BACKUP_AGE=7
      - BACKUP_CLEANUP=true
      - PACK=tar
      - CRON_SCHEDULE=02 9 27 10 *
    networks:
      - default
networks: {}

Have I made an error here? Here is some terminal output:

mssql-backup-1 | Starting cron task manager...
mssql-backup-1 | - Crontab = 02 9 27 10 *
2024-10-27 09:00:25.75 spid49s [DevOpsSnapshotTelemetryTask] Evaluating the background task.
2024-10-27 09:04:17.15 spid51 XE session 'telemetry_xevents' stopping.
2024-10-27 09:04:17.20 spid51 XE session 'telemetry_xevents' started.

I don't really know how to go about troubleshooting this issue but any advice will be gratefully received.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions