[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] [bug] Excluding hidden files the wrong way does
Re: [rdiff-backup-users] [bug] Excluding hidden files the wrong way doesn't result in an error
Thu, 5 Jan 2017 11:41:51 +0000
On 4 January 2017 at 22:40, Ilario <address@hidden> wrote:
> 2017-01-04 20:11 GMT+01:00 Adrian Klaver <address@hidden>:
>> On 01/04/2017 11:00 AM, Ilario wrote:
>>> Excluding a hidden file without full path doesn't rise an error (as
>>> happens with non hidden files) and copies it anyway; e.g.
>>> mkdir temp
>>> cd temp
>>> mkdir .one
>>> mkdir .two
>>> mkdir three
>>> mkdir four
>>> rdiff-backup --exclude .one --exclude ./.two --exclude ./three . ../backup
>>> ls -a ../backup
>>> . .. four .one rdiff-backup-data
>>> copies also the .one file and gives no warning.
>> I am not seeing a .one file I see a .one/ directory
> Yes, sorry, I meant directory, anyway I can see the same behaviour with files.
>> so I would say you need
>> to do:
>> --exclude .one**
> Does this work for you? It doesn't for me...
It does seem slightly strange behaviour by rdiff-backup. I think it is
better not to rely on backing up from the current directory but
instead to specify the directory explicitly as the source. Then
specify it explicitly for all excludes - or use ** instead
(remembering that this will also exclude similarly named
files/directories further down the tree). e.g.
mkdir -p ~/temp/.one
rdiff-backup --exclude ~/temp/.two --exclude **/three ~/temp ~/backup
find ~/backup -mindepth 1 -path "*rdiff-backup-data" -prune -or -print
You should see: