1

I have inherited a proprietary, distributed storage system that exposes its files through NFS. I need to move these files off the system. The trouble is that NFS links are reported as stale before I can list -- let along move -- even a modest fraction of the files. Current solution is to restart the NFS client every time a call to cp -aur * fails, but that is gets very inefficient as the number of files already copied grows.

Any advice?

0

2 Answers 2

5

Use rsync instead.

$ rsync -rav /path/to/nfsmount /path/to/local

You can remove the 'v' if you don't care for it to be verbose and list the files. If the nfs mount goes stale before it finishes just run it again and rsync will only copy what it missed.

0

When I have been faced with this type of situation in the past, I have always copied things one directory at a time so that I don't have to restart at the beginning each time.

Alternatively, I would start by making a shell script that repeatedly calls "cp" to copy one file at a time. Then, when it fails, I edit the shell script to remove the lines referring to files that have successfully been copied, and restart the script.

You must log in to answer this question.