Block decent into NFS mounted filesystem?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Block decent into NFS mounted filesystem?

Lew Wolfgang
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


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Block decent into NFS mounted filesystem?

Mike Fleetwood
On 9 February 2017 at 01:19, Lew Wolfgang <[hidden email]> 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

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Block decent into NFS mounted filesystem?

Lew Wolfgang
On 02/09/2017 02:21 AM, Mike Fleetwood wrote:

> On 9 February 2017 at 01:19, Lew Wolfgang <[hidden email]> 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 ...

Hi Mike,

One thing I forgot to mention is my use of autofs.  The stub mountpoint exists even
if not nfs-mounted.

The solution may be to just use --exclude and make sure that all nfs autofs mounts
occur in the excluded directory.  The  --exclude-if-present option is interesting, but
I don't think it will work with autofs since the directory entry appears even if not
mounted.

Thanks for the suggestions!
Lew

--
"When a government enforces lawlessness it is no longer a government of the people. It is a tyranny."
   -- P Gendron


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki