Compare commits
3 Commits
48591a1e87
...
62326b9750
| Author | SHA1 | Date | |
|---|---|---|---|
| 62326b9750 | |||
| 4f954c5858 | |||
| 58f11a3b61 |
@ -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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user