Copy all local filesystems, but ignore NFS mounts?
krjw at valaran.com
Wed Aug 3 18:15:36 GMT 2005
* <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.
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
SA Valaran Corp
I put the sh in IT.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20050803/218e1384/attachment.bin
More information about the rsync