Setup Cronjob To Run Rsync


Setup Cronjob To Run Rsync

Edit the crontab by using executing the following command:

crontab -e

Update the crontab with the desirable schedule time for the rsync to run. For example, I would like to have it run every 5 minutes:

*/5 * * * * rsync -r –delete -b -l -o -g -H -v -h –rsh=’ssh -p8286′root@192.168.0.13:/home/myfiles/path-to-be-backup  /backup/

This is the basic steps for backing up. For real time, the backup algorithm may be more complicated where you may wish to have the backup only on certain folder and may exclude certain files/folder. You may refer the following rsync manuals for better understanding before start your backup plan:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

shisdew

Listens until think alike

moses.spaceku@yahoo.com / voip ipbx

Hosted PBX, IP-PBX SOHO/ CALL CENTER, VOICE GATEWAY, VOICE CARD, COST EFECTIVE SOLUTIONS (LCR), GSM/CDMA GATEWAY

%d bloggers like this: