![]() Sudo crontab –u username your-cronjob-name. It creates incremental backups of files and directories to the destination of your choice. ![]() Load cron jobs from file crontab-master to run as root This script offers Time Machine-style backup using rsync. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync. ![]() To disable email notification but allow error email * * * * * command > /dev/null Rsync is a fast and extraordinarily versatile file copying tool. ![]() To disable email notification * * * * * command > /dev/null 2>&1 Make the bash script executable chmod 770 kim-rsync.shĬreate crontab-master file containing all your tasks with desired scheduling sudo nano * * * * /path/to/your/bash/script.shįor crontab to send you email notification you need to have MTA. Sudo rsync -avhz -delete -stats -progress -log-file=/home/kim/crontab/rsync-log/rsync-$(date +%Y-%m-%d).log /media/windowsshare/ /srv/samba/share/ This article we bring shell scripts to backup your files / directories from you local linux machine to a remote linux server using rsync command./bckrsync. Sudo rsync -avhz -delete -stats -progress -exclude /backup -log-file=/home/kim/crontab/rsync-log/$(date +%Y-%m-%d).log /var/www/html/ /var/www/html/backup/$(date +%Y-%m-%d)/ Sudo mkdir -p /var/www/html/backup/$(date +%Y-%m-%d) sh containing your task nano kim-rsync.sh
0 Comments
Leave a Reply. |