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

Backups filenames missing timestamp as of v3.8.0 #215

Closed
tpansino opened this issue Apr 11, 2023 · 0 comments · Fixed by #216
Closed

Backups filenames missing timestamp as of v3.8.0 #215

tpansino opened this issue Apr 11, 2023 · 0 comments · Fixed by #216
Labels

Comments

@tpansino
Copy link
Contributor

Summary

Backups filenames are missing the timestamp as of v3.8.0

Steps to reproduce

  1. Make a backup of a SQLite database with the default settings. (Based on the code I think this is also affecting InfluxDB and MSSQL, but didn't test those)
  2. Observe the backup file has no timestamp in the name (eg: sqlite3_db.sqlite3.xz), and consequently there is no retention of previous backup files.

What is the expected correct behavior?

Backup file should have a timestamp in the name, and a new backup file should be present after each run.

Relevant logs and/or screenshots

** Performing Manual Backup
2023-04-11.22:27:49 [NOTICE] ** [db-backup] Dumping sqlite3 database: '/db.sqlite' and compressing with 'xzip'
2023-04-11.22:27:49 [INFO] ** [db-backup] DB Backup of 'sqlite3_db.sqlite3.xz' completed successfully
2023-04-11.22:27:53 [NOTICE] ** [db-backup] Backup of sqlite3_db.sqlite3.xz created with the size of 37709892 bytes
mv: can't rename '/tmp/backups/*.': No such file or directory
ln: /backup/latest-sqlite3__/db.sqlite: No such file or directory
2023-04-11.22:27:53 [NOTICE] ** [db-backup] DB Backup for 'db' time taken: Hours: 0 Minutes: 00 Seconds: 04
2023-04-11.22:27:53 [INFO] ** [db-backup] Backup routines finish time: 2023-04-11 22:27:53 GMT with overall exit code 0
2023-04-11.22:27:53 [NOTICE] ** [db-backup] Backup routines time taken: Hours: 0 Minutes: 00 Seconds: 04
2023-04-11.22:27:53 [INFO] ** [db-backup] Cleaning up old backups on filesystem

Environment

  • Image version / tag: any version since v3.8.0
  • Host OS: Ubuntu 22.04
docker-compose.yml backup: container_name: backup image: tiredofit/db-backup:latest restart: on-failure:5 volumes: - /db.sqlite3:/db.sqlite:ro - /backups:/backup environment: COMPRESSION: "xz" DB_TYPE: "sqlite" DB_HOST: "/db.sqlite" DB_DUMP_BEGIN: "0801" DB_CLEANUP_TIME: "14400" ENABLE_CHECKSUM: "false" CONTAINER_ENABLE_MONITORING: "false"

Possible fixes

Looks to me like there are several ltarget variables not set properly in install/assets/functions/10-db-backup for the 3 DB types I mentioned above. I'll open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant