Questions about rsync

Walter Dnes waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org
Tue Apr 25 04:09:36 UTC 2006


On Mon, Apr 24, 2006 at 09:43:56AM -0400, Daniel Armstrong wrote

> rsync -av --delete --exclude "Cache/" /home/daniel/ /media/backup/daniel/

  Do I understand correctly that you can say "Cache/" instead of
"/home/danial/.mozilla/firefox/blahblahblah.default/Cache/" ?  That
would be nice.

  While we're at it, my setup is a bit unusual in that I point both my
email and usenet spools into my home directory.  Email is OK.  Usenet,
could be interesting.  I'd like to save the structure of the usenet
directories, plus the ".minmax" file in each group, without actually
saving a gazillion articles.  My current backup script starts off with...

if [ -a /home/waltdnes/minmax.zip ]; then
  rm /home/waltdnes/minmax.zip
fi
zip -9r /home/waltdnes/minmax.zip /home/waltdnes/spoolastra/* -i */.minmax

  This saves the structure in a zip file in my home directory.  This
zip file gets backed up as part of the backup.  I exclude
/home/waltdnes/spoolastra/slrnpull/news/* from tar.

  As a start, here's what I'm looking at so far...

#!/bin/bash
if [ -a /home/waltdnes/minmax.zip ]; then
  rm /home/waltdnes/minmax.zip
fi
zip -9r /home/waltdnes/minmax.zip /home/waltdnes/spoolastra/* -i */.minmax
rsync -av --delete --exclude-from=.excludersync /home/waltdnes/ \
  /mnt/bigdrive/waltdnes/

The file ~/.excludersync would contain the lines...

/home/waltdnes/spoolastra/slrnpull/news/
/home/waltdnes/.mozilla/firefox/account1.default/Cache
/home/waltdnes/.mozilla/firefox/account2.default/Cache

...and possibly others.

-- 
Walter Dnes <waltdnes-SLHPyeZ9y/tg9hUCZPvPmw at public.gmane.org> In linux /sbin/init is Job #1
My musings on technology and security at http://tech_sec.blog.ca
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list