[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] Block decent into NFS mounted filesystem?
From: |
Mike Fleetwood |
Subject: |
Re: [rdiff-backup-users] Block decent into NFS mounted filesystem? |
Date: |
Thu, 9 Feb 2017 10:21:19 +0000 |
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 ...
Mike