Crie alguns scripts
-
sudo nano /usr/local/bin/rsync_html
#!/bin/bash /usr/bin/rsync -av --delete /var/www/html /media/stan/Seagate\ Expansion\ Drive/backups/
-
sudo nano /usr/local/bin/rsync_documents
#!/bin/bash /usr/bin/rsync -av --delete /home/stan/documents /media/stan/Seagate\ Expansion\ Drive/backups/
-
sudo nano /usr/local/bin/rsync_backups
#!/bin/bash /usr/bin/rsync -av --delete /var/backups /media/stan/Seagate\ Expansion\ Drive/backups/
-
sudo nano /usr/local/bin/backup_mysql
#!/bin/bash mysqldump -u root -ppassword --all-databases | gzip > /media/stan/Seagate\ Expansion\ Drive/backups/mysql/mysqlbak-$(date "+\%Y-\%m-\%d_\%H:\%M:\%S").sql.gz
Tornar os scripts executáveis
sudo chmod +x /usr/local/bin/rsync_html
sudo chmod +x /usr/local/bin/rsync_documents
sudo chmod +x /usr/local/bin/rsync_backups
sudo chmod +x /usr/local/bin/backup_mysql
Altere seu crontab
44 4 * * * /usr/local/bin/rsync_html
33 3 * * * /usr/local/bin/rsync_documents
02 2 * * * /usr/local/bin/rsync_backups
44 1 * * * /usr/local/bin/backup_mysql
Crie alguns arquivos da área de trabalho
-
nano ~/.local/share/applications/scrip1.desktop
[Desktop Entry] Version=1.0 Type=Application Name=rsync html Exec=/usr/local/bin/rsync_html Icon= Categories= Terminal=false StartupNotify=true
-
nano ~/.local/share/applications/scrip2.desktop
[Desktop Entry] Version=1.0 Type=Application Name=rsync documents Exec=/usr/local/bin/rsync_documents Icon= Categories= Terminal=false StartupNotify=true
-
nano ~/.local/share/applications/scrip3.desktop
[Desktop Entry] Version=1.0 Type=Application Name=rsync backup Exec=/usr/local/bin/rsync_backups Icon= Categories= Terminal=false StartupNotify=true
-
nano ~/.local/share/applications/scrip4.desktop
[Desktop Entry] Version=1.0 Type=Application Name=backup mysql Exec=/usr/local/bin/backup_mysql Icon= Categories= Terminal=false StartupNotify=true