Still work in progress, I did some modifications.
What has changed?
The MySQL backup will now keep 7 day en 3 sunday backups, then the oldest will be deleted in the local backup.
The backup directory structure is changed, it will now create a time directory inside the date directory.
Added echo's for screen output when running the script in screen.
- Purge option on remote FTP server - Delete after 7 days, keep sunday for 3 weeks
- Purge option on remote FTP server - Delete sunday backup after 22 days
- Create exclusion "if directory exist"
- Include ISPconfig and all files needed for a reatore in case of a crash
The script is as/is, it does work but I couldn't test the rotation for the 22 days.