On 9 February 2017 at 01:19, Lew Wolfgang <address@hidden> wrote:
Hi Folks,
Is there a way to prevent rdiff-backup from descending into an NFS-mounted
filesystem?
I don't think --exclude-other-filesystems will work since I already
intentionally back
up multiple filesystems in one invocation.
I inadvertently backed up 25-T of data this weekend!
Thanks,
Lew
Using option --exclude SHELL_PATTERN will work. I backup from /
(root) downwards excluding /proc, /dev, /sys, etc. file system content
like this:
rdiff-backup --exclude /proc/** --exclude /dev/** --exclude
/sys/** ... / $BACKUPDEST
--exclude /proc/** excludes everything below the /proc directory, but
the directory itself is backup up. Exactly what I want so that on
restore an empty directory is created as the mount point.
Alternatively the --exclude-if-present option is documented in the
manual page as another option that would meet you needs. I haven't
tried it myself but something like this would appear to work. (The
name .no-rdiff-backup is not special. It just has meaning to us
humans):
cd /mnt/nfs25t
touch .no-rdiff-backup
rdiff-backup --exclude-if-present .no-rdiff-backup ...