This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a full or incremental xtrabackup | |
# In the cron job, set it like below: | |
## xtrabackup weekly full backup (Saturday, 9 PM UTC == Sunday, 5 AM MYT) | |
## 0 21 * * 6 /root/backups/scripts/xtrabackup.sh full > /dev/null | |
## xtrabackup daily incremental backup (Sunday->Friday, 9 PM UTC == Monday->Saturday, 5 AM MYT) | |
## 0 21 * * 0-5 /root/backups/scripts/xtrabackup.sh incremental > /dev/null | |
# Note: | |
## - For every full backup taken, all created incremental backups will be deleted. |