Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create backup fails with error #382

Open
myriad007 opened this issue Oct 27, 2024 · 0 comments
Open

Unable to create backup fails with error #382

myriad007 opened this issue Oct 27, 2024 · 0 comments
Labels

Comments

@myriad007
Copy link

Summary

Whenever I try to create a backup it fails with an tmp directory error and creates a linked file in the /backups directory with no data.

Steps to reproduce

running $ backup-now from the cli

What is the expected correct behavior?

Backup file is created and put in my backup directory.

Relevant logs and/or screenshots

[tiredofit/db-backup:4.1.4 17:23:05 /] $ backup-now
2024-10-27.17:23:09 [INFO] ** [db-backup01] Starting Manual Backup for db-backup01
2024-10-27.17:23:10 [NOTICE] ** [01-mssqlserver__school2021_1] Dumping MSSQL database: 'school2021_1'
cat: /tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak: No such file or directory
2024-10-27.17:23:10 [INFO] ** [01-mssqlserver__school2021_1] DB Backup of 'mssql_school2021_1_mssqlserver_20241027-172310.bak' completed successfully
stat: cannot statx '/tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak': No such file or directory
date: /tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak: No such file or directory
stat: cannot statx '/tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak': No such file or directory
2024-10-27.17:23:10 [NOTICE] ** [01-mssqlserver__school2021_1] Backup of 'mssql_school2021_1_mssqlserver_20241027-172310.bak' created with the size of bytes
chmod: cannot access '/tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak': No such file or directory
mv: cannot stat '/tmp/backups/01_dbbackup.1sHDVM/mssql_school2021_1_mssqlserver_20241027-172310.bak': No such file or directory
2024-10-27.17:23:10 [ERROR] ** [01-mssqlserver__school2021_1] Moving of backup 'mssql_school2021_1_mssqlserver_20241027-172310.bak' reported errors
2024-10-27.17:23:10 [NOTICE] ** [01-mssqlserver__school2021_1] DB Backup for 'school2021_1' time taken: Hours: 0 Minutes: 00 Seconds: 00
2024-10-27.17:23:10 [ERROR] ** [01-mssqlserver__school2021_1] Skipping Cleaning up old backups because there were errors in backing up
2024-10-27.17:23:10 [INFO] ** [01-mssqlserver__school2021_1] Backup 01 routines finish time: 2024-10-27 17:23:10 EDT with exit code 0
2024-10-27.17:23:10 [NOTICE] ** [01-mssqlserver__school2021_1] Backup 01 routines time taken: Hours: 0 Minutes: 00 Seconds: 00

Environment

Docker running on Truenas Scale using Dockge

  • Image version / tag:
  • Host OS:

version: "3.3"
services:
mssqlserver:
environment:
- ACCEPT_EULA=Y
- TZ=America/Toronto
- MSSQL_SA_PASSWORD=xxxxx
- MSSQL_PID=Express
- MSSQL_BACKUP_DIR=/var/opt/mssql/backups
- shm-size 1g
ports:
- 1433:1433
volumes:
- /mnt/mssql/data:/var/opt/mssql/data
- /mnt/mssql/log:/var/opt/mssql/log
- /mnt/mssql/secrets:/var/opt/mssql/secrets
- /mnt/mssql/backups:/var/opt/mssql/backups
container_name: sqlpreview
hostname: mssqlserver
image: mcr.microsoft.com/mssql/server:2022-preview-ubuntu-22.04
networks:
- default
user: root
restart: unless-stopped
db-backup:
container_name: db-backup
image: tiredofit/db-backup
volumes:
- /mnt/mssql/backups:/backup
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
environment:
- TIMEZONE=America/Toronto
- CONTAINER_NAME=db-backup
- CONTAINER_ENABLE_MONITORING=FALSE
- BACKUP_JOB_CONCURRENCY=1 # Only run one job at a time
- DEFAULT_CHECKSUM=NONE # Don't create checksums
- DEFAULT_COMPRESSION=NONE
- DEFAULT_BACKUP_BEGIN=15 00 * * *
- DB01_BACKUP_BLACKOUT_BEGIN=0600
- DB01_BACKUP_BLACKOUT_END=2350
- DEFAULT_CLEANUP_TIME=8640 # Cleanup backups after a week
- DEFAULT_MSSQL_MODE=DATABASE
- DB01_TYPE=mssql
- DB01_HOST=mssqlserver
- DB01_NAME=school2021_1
- DB01_USER=sa
- DB01_PASS=xxxxx
restart: always
networks:
- default
networks:
default: null

Image:  tiredofit/db-backup | Version  4.1.4

Possible fixes

Any ideas gratefully appreciated.

@myriad007 myriad007 added the bug label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant