rsync’ing NFS shares

One time I was moving all of an application’s data to a new NFS server where I worked. I did an rsync to copy everything over, then took the application offline to do a re-sync of just the changes that happened during the first rsync. I do, because it took forever and I had to explain the downtime to the CEO.

I think about it every once in a while now because I backup my work computer to a SMB share at work with rsync and it takes forever. The reason is that all of the data has to be transmitted over the network if you don’t use either ssh or a standard rsync server.

What I did when I transferred the data over was:
mount oldNFSserver:/data /data2
rsync -avH /data2/ /data/
[take down web application]
rsync -avH /data2/ /data/

Which transferred all of the data again.

What I should have done was:
rsync -avH oldNFSserver:/data/ /data/
[take down web application]
rsync -avH oldNFSserver:/data/ /data/

Which would have only transferred only the delta over ssh the second time.

I’ve been thinking about this because I am starting to set up a redundant NAS at my house and my parent’s house. This way if either are damaged by flood/lightning/fire I will have a copy of my data somewhere.

One Reply to “rsync’ing NFS shares”

  1. Hello Randall,

    As you note, you can only use your suggested method if your NFS server supports rsync or rsync over ssh. For example with a NetApp, I’m not sure what you can do to alleviate the issue. Any thoughts?

    — Balazs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.