Copy all local filesystems, but ignore NFS mounts?

Dan Stromberg strombrg at
Wed Aug 3 22:27:13 GMT 2005

On Wed, 03 Aug 2005 16:30:28 -0400, Keith Warno wrote:

> * <strombrg at> [03/08/2005 1531EDT]:
>> On Wed, 03 Aug 2005 14:15:36 -0400, Keith Warno wrote:
>> > * <strombrg at> [02/08/2005 2008EDT]:
>> >> 
>> >> What's the easiest way, with rsync, to back up all local filesystems to
>> >> another host, ignoring anything on an NFS volume.
>> >> 
>> >> For example, is there a way of giving a list of mount points but still
>> >> have --one-file-system work?
>> > 
>> > I don't think this is a question for rsync, per se, but more of a
>> > scripting and utility question.
>> > 
>> > There's plenty of ways to do this, depending on your version of mount.
> [snip my own babbling...]
>> Thanks for the response Keith, but I've got a firm grip on these aspects
>> of the problem.
>> What I don't have a firm grip on, is upon digging up a list of local
>> filesystems, how do I then rsync all the files in those filesystems with a
>> single rsync command?  Or at least, how I can do it with at most one
>> password entry, so I don't have to come back and reauthenticate for each
>> filesystem?
> Can't you just do:
> 	rsync --del --one-file-system \
> 	-av /path/to/fs1 /path/to/fs2 \
> 	[more paths...] \
> 	you at remotehost:/path/to/backup/tree/.
> ?

This is pretty much what I tried before, that wasn't working, but I was
using rsync 2.6.5.  It seems like the multiple filesystems have a bad
interaction with the --one-file-system option - for example:

ark-root /DCS) rsync --one-file-system --rsh=ssh / /var/ /var/run/ /tmp/ /export/home/ /spare/ /opt/ root at
root at's password: 
skipping directory /.
skipping directory /var/.
skipping directory /var/run/.
skipping directory /tmp/.
skipping directory /export/home/.
skipping directory /spare/.
skipping directory /opt/.
ark-root /DCS) 

> I think this does exactly what you want, at least w/ rsync version
> 2.6.6.
> I also use SSH exclusively for transport and you could use SSH as well
> (w/ public key authentication) to eliminate the password prompting
> altogether.

The ssh public keys thing is good for what I'm doing in some cases and
not others.  I'm trying to code up an application, and I'd prefer it if I
could keep the ssh authentication to a minimum - ideally, only occuring

> Or maybe I'm missing the point entirely?  Forgive me if I am; I can't
> multitask as well as my OS. :)

No, you're not missing the point entirely at all.  :)  I'm probably not
being clear enough.


More information about the rsync mailing list