[K12OSN] Massive Rsyncing

dahopkins at comcast.net dahopkins at comcast.net
Fri Apr 2 17:31:20 UTC 2004


Jim,

Sorry for the delay in responding.  I finally got some free time (lunch).  

I have to agree with Les that Backuppc is absolutely the way to go long term.  I  didn't use it bacause it didn't support rsync when I first needed a solution.  Over the summer, I will switch/start using it for some of my needs.  My current approach is so robust, I am not ready to give it up yet :)

Now, here is the rsync command I use (cut from a script that runs via cron, so it may not make total sense without all the other stuff.  I adapted the solution at http://www.mikerubel.org/computers/rsync_snapshots/ to implement my backup scheme.
----------------------------
TODAY="/backups"
LAST=`ls -tr /backups | tail -1`
NOW=`date +%R`

rsync -va --link-dest=$TODAY/$LAST --exclude-from=/backups/exclude-list -e "/usr/bin/ssh -i /root/.ssh/root" myhomehost:/home/ $TODAY/$NOW > $TODAY/$NOW/rsync.log
------------------------------

Key piece is the --exclude-from=/backups/exclude-list

As I find things that don't need to be backed up, I just add them to the exclude-list.

I also have a little script that searches all the old backups and then removes the stuff I just added to the exclude list. (I run the script manually from the backups directory) The script is (hardcoded to find core* files in this example)

for i in `ls -r`
do
    echo Searching $i
    rm -rf `find $i -name core*`
done

My exclude-list file is shown below.
- Cache/
- Cookies
- FrontPageTempDir
- NTUSER.DAT
- NetHood
- PrintHood
- Start\ Menu
- Templates
- core.*
- ntuser.dat.LOG
- ntuser.ini
- nspmcvt.exe
- .Trash
- .Xauthority
- .bash*
- .acrobat
- .adobe
- .emacs
- .esd_auth
- .fonts*
- .g*
- .java
- .mozilla
- .nautilus
- .netscape
- .openoffice
- .thumbnails
- .xsession-errors
- *.asd

Sincerely,
Dave Hopkins
> Thank you Dave, Les and Sudev.  Now I have:
> 
> rsync -az -p --exclude ".mozilla" -g -e ssh /home 192.168.1.6:/home2/thin
> 
> This morning my backup drive is 15 gigs richer...!
> 
> Jim
> 
> _________________________________________________________________
> http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://
> hotmail.com/enca&HL=Market_MSNIS_Taglines
> 
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>





More information about the K12OSN mailing list