fast network file copying using tar and nfs

Configure an NFS export on the remote machine (e.g. 192.168.1.3) to copy to (e.g. /remotedir).

Create empty directory on local machine, and mount remote directory to it:

mkdir /remotedir

mount 192.168.1.3:/remotedir /remotedir

tar -c localdir/ | tar -C /remotedir/ -xv

That will copy contents of localdir to /remotedir on remote machine.

I used the above method to quickly copy some vmware images to a new server. scp copies were taking way too long. I was using ubuntu dapper servers, but it will work basically the same on any linux machines.

Leave a Reply

You must be logged in to post a comment.