Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Oct 19 '09 at 15:43

This question came from our site for professional and enthusiast programmers.

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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