[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] exclude parent directory of a file
From: |
Maarten Bezemer |
Subject: |
Re: [rdiff-backup-users] exclude parent directory of a file |
Date: |
Thu, 13 Jul 2006 14:52:00 +0200 (CEST) |
On Thu, 13 Jul 2006, Andi Siptak wrote:
> Am 13. Jul 2006 um 01:44:19 +0100, schrieb Chris Wilson:
> >>How can I exclude the parent directory of a file when backing up
> >>with rdiff-backup? I don't want to backup directories which
> >>contain the file .nobackup
> >
> >Have you tried "--exclude **/.nobackup"?
>
> Yes, it correctly excludes the file .nobackup, but not more.
Correct.
Maybe you could use find to locate .nobackup files, and generate a script
with the rdiff-backup command with exclude arguments for all directories
containing .nobackup files.
Or you could generate a (globbing or non-globbing) include/exclude file to
be used by rdiff-backup.
Something like:
find /backed-up-tree -name ".nobackup" -printf "%h\n" > excludefile
Things to note: what do you want when some directory contains .nobackup,
do you want to also exclude its subdirs?
HTH,
Maarten