Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently using rsnapshot to backup a server farm where NFS is used heavily. Unfortunately, the current setup has us backing up the same files multiple times due to the NFS mounts.

For example, /etc/rsnapshot.conf has this:

backup backupuser@machine1:/local_directory/       machine1
backup backupuser@machine2:/exported_directory/       machine2

Now, machine1 has /local_directory/exported_directory mounted -- so I end up with backups of both machine1/local_directory/exported_directory AND machine2/exported_directory.

While I could work around this by either mounting things differently on the clients or by manually excluding the directories, I'd rather find a cleaner approach (which is probably a rsnapshot or rsync option).

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Found it! I knew I should've perused the man pages one last time before posting :)

It's -x or --one-file-system option to rsync.

  -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.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.