[K12OSN] Re: automating network-based backups (Matt Oquist)

Sudev Barar sudev at mantraonline.com
Sun Feb 6 04:02:33 UTC 2005


On Sun, 2005-02-06 at 04:20, Matt Oquist wrote:
[SNIP]
>   ==> Here is an example from ltsp.gbecs.org:
> ####################################################
> 0 0 * * * /usr/bin/rsync -avz -e "ssh -i /root/.ssh/gbecs_backup" --delete --exclude=/proc --exclude=/export --exclude=/backup --exclude=/sys / apps:/backup/ltsp/ 2>&1 >> /backup/ltsp.log
> ####################################################
>   Explanation:
>   - 0 0 * * *: This tells the cron daemon to start this job at midnight every day.
>   - We're running the rsync command with -a (archive), -v (verbose), -z (zip),
>     and -e (which we tell to connect via ssh, using the private key
>     /root/.ssh/gbecs_backup).
>   - We tell rsync to --delete any files on the destination that don't exist on the source.

I like to add update option as well so that in case the file on target
system has update flag latr than the source system then the file on
target is not overwritten. Of course this is true only if there is a
user (or a set of them) who log in at both systems.

We run this every hour so that if user shifts from one system to other
he will find his files in the /home. 
-- 
Sudev Barar
Learning Linux




More information about the K12OSN mailing list