Data Networking/Fall 2014/Priya/guide to setting up rsync

From Wikiversity
Jump to navigation Jump to search

Install rsync

    apt-get install rsync

Simply run the following command from the backup web server workstation

    rsync -avzhe --progress --inplace --rsh='ssh -p555' peterkelada@192.168.3.50:/var/www/ /var/www

Now, to schedule the backup web server to periodically download updated files from main web server, we use crontab service.

    crontab -e

Add the following line to automatically synchronize the backup with the main web server every 30 minutes

    */30     *     *     *     *     rsync -avzhe --progress --inplace --rsh='ssh -p555' 
                                                                peterkelada@192.168.3.50:/var/www/ /var/www