Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prevent rsync from backing up nfs mounted drives

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
CA
Hi there,
I have the following cron schedule
rsync -az --rsh=ssh server1:/home/ /backup

This backs up everything in the remote machine's home directory in my /backup dir. The problem I am having is, it backs up a nfs mounted directory as well.

Is there anyway to tell rsync just to sync up regular directories and not nfs items? I know I can hard code it into the command, but I was wondering if there was a more generic approach to this.
 
You could use -x to not cross over into other filesystems, but then it also skips other local FSs you might have mounted under /home...

see man page:
-x, --one-file-system
This tells rsync not to cross filesystem boundaries when recursing. This is useful for transferring the contents of only one filesystem.



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top