Copy all local filesystems, but ignore NFS mounts?

Keith Warno krjw at valaran.com
Wed Aug 3 20:30:28 GMT 2005


* <strombrg at dcs.nac.uci.edu> [03/08/2005 1531EDT]:
> On Wed, 03 Aug 2005 14:15:36 -0400, Keith Warno wrote:
> 
> > * <strombrg at dcs.nac.uci.edu> [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/.

?

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.

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


> My first thought was to just list all of the mount points, but then some
> of those directories will have NFS mounts under them, making
> --one-file-system advantageous, but if I give a list of mount points
> to rsync, then it appears that it doesn't want to sync a single
> file.  :-S

-- 
SA Valaran Corp
GPG: 0xEC705AE9
I put the sh in IT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20050803/68d1ee1a/attachment.bin


More information about the rsync mailing list