On 08/15/2015 03:00 PM, Joe S wrote:
> I Thought I was doing that with the filter rule: [...]

It looks to me like your filter syntax is incorrect:

   --filter=merge_/root/bin/root-filter-rule 

so maybe you can try changing it to:

   --filter="merge /root/bin/root-filter-rule"

However, as the filter section in man rsync is quite rich and I've never used 
that option (although I did write my rsync based backup script), given that 
your list of excludes isn't that long I'd suggest using a combination of 
directory names to backup and '--exclude' options.

IIUC your rules file, they can be translated into plain English as:

   "backup everything under /home/joe/ but exclude everything under 
   /home/joe/.cache/"

   "backup everything under /root/ /boot/ /etc/"

   "backup everything under /usr/local/"

then the rsync command could be written as:

   rsync \
      -av \
      --numeric-ids \
      --delete \
      --delete-excluded \
      --exclude=**/.cache/*** \
      /home/joe/ /root/ /boot/ /etc/ /usr/local/ \
      /media/root-backup/

You may also want to look into the option '--link-dest' which allows you to 
keep daily/hourly copies at a fraction of storage space.

Filter rules are an interesting topic. Thanks for bringing it up, I'll keep 
this in the work queue for when I'll have some time to read that section more 
carefully.

-- 
Viorel


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
clug-talk mailing list
clug-talk@clug.ca
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to