Merge branch 'action'
All checks were successful
Build Container Image & push to Packages / Build package (push) Successful in 46s

This commit is contained in:
Audrey Jensen 2025-04-03 09:08:43 -05:00
commit 62326b9750
Signed by: audrey
SSH Key Fingerprint: SHA256:k+6b1AGMt7Q6374OfeAXUFNe0eFpsUt6eV4biffF06U
2 changed files with 7 additions and 2 deletions

View File

@ -24,5 +24,5 @@ else
FILENAME="$BACKUP_NAME.sql" FILENAME="$BACKUP_NAME.sql"
fi 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 echo "MySQL backup complete" >> /var/log/cron.log

View File

@ -46,6 +46,8 @@ services:
APPEND_DATE: true APPEND_DATE: true
networks: networks:
- nastest - nastest
volumes:
- "backup:/backup"
volumes: volumes:
db: db:
driver: local driver: local
@ -56,7 +58,8 @@ networks:
external: false external: false
``` ```
#### Backup to NAS #### 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] > [!IMPORTANT]
> If you intend to keep regular snapshots of this backup on the file server, you should set APPEND_DATE to false > 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 APPEND_DATE: false
networks: networks:
- nastest - nastest
volumes:
- "backup:/backup"
volumes: volumes:
db: db:
driver: local driver: local