Quantcast
Channel: Admins Goodies » rsnapshot
Viewing all articles
Browse latest Browse all 10

Configuring rsnapshot to only backup local file systems

$
0
0

Question

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

Answer

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.

Viewing all articles
Browse latest Browse all 10

Trending Articles