I want to create the cron-job for the following steps:
- Backup my entire ubuntu server with the following command:
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=/dev --exclude=/sys /
- after the backup in the archive is finished i want to rsync the archive with the following command:
sudo rsync -avz /backup.tar.gz -e "ssh -i /path/.ssh/ssh-key -p Port" backup@xxx.xxx:/path/path/path
Can we set a cron-job for this?