Using rsync, I exclude '/*/tmp' from my backups.  So if I'm backing up
/home, it'll exclude /home/user/tmp, but not /home/user/myfolder/tmp.

You could also try excluding '/**/tmp'.  Rsync interprets the double
asterisk to mean "any number of directories", not just a single
directory.  I'm not sure if it works with BackupPC though.

-Rob

Erik van Linstee wrote:
> While experimenting with rsync and rsyncd I noticed some unexpected 
> behaviour.
> 
> Consider the very simple config file below. It is intended to backup all 
> files in /doc/private on hd, expect for those found in temp or tmp 
> directories.
> 
> $Conf{RsyncShareName} = [
>   'hdc'
> ];
> $Conf{XferMethod} = 'rsyncd';
> $Conf{BackupFilesOnly} = {
>   'hdc' => [
>     '/docs/private'
>   ]
> };
> $Conf{BackupFilesExclude} = {
>   'hdc' => [
>     'tmp'
>   ],
>   '*' => [
>     'temp'
>   ]
> };
> 
> 
> 
> But it fails miserably as can be seen from the log below. It completely 
> ignores the rule to exclude temp.
> 
> full backup started for directory hdc (baseline backup #7)
> Connected to triplt1:873, remote version 29
> Negotiated protocol version 28
> Connected to module hdc
> Sending args: --server --sender --numeric-ids --perms --owner --group -D 
> --links --hard-links --times --block-size=2048 --recursive --ignore-times . .
> Sent include: /docs
> Sent include: /docs/private
> Sent exclude: /*
> Sent exclude: /docs/*
> Sent exclude: tmp
> Xfer PIDs are now 15442
> 
> 
> However, if I remove the exclude rule for tmp, I get:
> 
> full backup started for directory hdc (baseline backup #7)
> Connected to triplt1:873, remote version 29
> Negotiated protocol version 28
> Connected to module hdc
> Sending args: --server --sender --numeric-ids --perms --owner --group -D 
> --links --hard-links --times --block-size=2048 --recursive --ignore-times . .
> Sent include: /docs
> Sent include: /docs/private
> Sent exclude: /*
> Sent exclude: /docs/*
> Sent exclude: temp
> 
> 
> I am not sure if this is intended behaviour, but it certainly is not 
> expected. If would expect those rules to accumulate, having rules with * 
> as a key to apply to all shares -- making it easy to always for instance 
> exclude temporary directories -- on top of rules specific for a share.
> 
> Any thoughts?
> 
> By the way, I also think it would be nice if backuppc could apply some 
> magic to make definitions uniform. Right now, an rsync share must be 
> entered as /home, whereas the same share as an rsyncd module, would be 
> entered as home. As on Samba. Maybe backuppc could translate home to 
> /home for rsync.
> 
> regards,
> Erik
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/backuppc-users
> http://backuppc.sourceforge.net/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to