Backups
Remote backup of user directory and MySQL database that deletes the backup from 4 weeks ago serverLocation=”example.com”; syncLocation=”/media/StorageDrive/example.com.sync/”; saveLocation=”/media/StorageDrive/example.com.backups/”; rsync -a root@$serverLocation:/home/ $syncLocation/home/; ssh root@$serverLocation -t “mysqldump –all-databases” > $syncLocation/mysql.sql; cd $syncLocation; tar -cvzf $saveLocation/$(date +%y-%m-%d).tar . ; rm -f /home/user123/mail-backup-$(date –date=”4 weeks ago” +%y-%m-%d).tar; Local cron backup command for one email account that deletes…
Read more