Copy all local filesystems, but ignore NFS mounts?

Keith Warno krjw at
Wed Aug 3 18:15:36 GMT 2005

* <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.

With mount-2.11y on a Linux box:

	mount -t nonfs

shows all mounts that are not NFS.

Also local disks will correspond to devices in /dev/, right?  So:

	mount|grep ^/dev/|cut -d' ' -f3

should show you all "local" mounts.  Of course you can modify that grep
regex to be more specific, like "^/dev/[sh]d" to select SCSI and IDE
disks only.

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 :

More information about the rsync mailing list