From 58f11a3b61f9ade868f799f1c71fa3417b1fdc50 Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Thu, 3 Apr 2025 09:05:36 -0500 Subject: [PATCH 1/2] mysqldump log errors --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 8d61590..8408435 100644 --- a/backup.sh +++ b/backup.sh @@ -24,5 +24,5 @@ else FILENAME="$BACKUP_NAME.sql" fi -mysqldump -u root --password=$MYSQL_ROOT_PASSWORD --host=$MYSQL_HOST --all-databases > "/backup/$FILENAME" +mysqldump -u root --password=$MYSQL_ROOT_PASSWORD --host=$MYSQL_HOST --all-databases --log-error=/var/log/cron.log> "/backup/$FILENAME" echo "MySQL backup complete" >> /var/log/cron.log \ No newline at end of file From 4f954c58583b676314323584874440efc36d1387 Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Thu, 3 Apr 2025 09:08:04 -0500 Subject: [PATCH 2/2] add volumes to sample compose scripts --- readme.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index bc351b6..04ffbe7 100644 --- a/readme.md +++ b/readme.md @@ -46,6 +46,8 @@ services: APPEND_DATE: true networks: - nastest + volumes: + - "backup:/backup" volumes: db: driver: local @@ -56,7 +58,8 @@ networks: external: false ``` #### Backup to NAS -For increased data security, it's recommended to store database backups on the NAS where they can take advantage of increased storage, automatic snapshots, & further backups. +For increased data security, it's recommended to store database backups on the NAS where they can take advantage of increased storage, automatic snapshots, & further backups. +The below example is identical to the one above, except `APPEND_DATE` has been set to `false` & the volume definition for `backup` has been modified. > [!IMPORTANT] > If you intend to keep regular snapshots of this backup on the file server, you should set APPEND_DATE to false ``` @@ -80,6 +83,8 @@ services: APPEND_DATE: false networks: - nastest + volumes: + - "backup:/backup" volumes: db: driver: local