![]() Sudo crontab –u username your-cronjob-name. Load cron jobs from file crontab-master to run as root You can create a cronjob to call the daily, weekly, and monthly backup scripts. The -hard-links rsync option tells rsync to compare the files with those in backups/LASTDATE/. To disable email notification but allow error email * * * * * command > /dev/null Butterfly Backup is a simple command line wrapper of rsync for complex task, written in python. The scripts rsyncs your directory contents to backups/DATE/. 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/ 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 There are some pounded-out notes for the scripts feel free to remove them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |