Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Oct 19 '09 at 15:43

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

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

You must log in to answer this question.