Fwd: [Novalug] Having problems copying data using cp over nfs
creitz at gmail.com
Tue Jun 19 07:44:49 EDT 2007
> > Jay Hart wrote:
> >> I am in the process of standing up my NAS server. I am trying to copy off
> >> all
> >> my users Maildir directories to the NAS box as a file backup.
> >> So, my account on the box, has 93MB of data in the Maildir folder, in 160
> >> subfolders and includes 3217 files. (reported by fish)
> >> What I have managed to copy over is 7.3MB of data, in 160 folders, and 553
> >> files were copied over.
> >> I used the following command:
> >> cp -r /home/jhart/Maildir/* /mntpoint/email/home/jhart/Maildir
> >> I figured this would recursively copy all files under the Maildir dir to the
> >> new location.
> >> Why didn't all files get copied over? What did I do wrong? What would work?
'cp -r' will pick up hidden files, but the glob (*) in 'cp -r
/home/jhart/Maildir/*' will not. So you are missing out on whatever
hidden files and directories are in the top level of Maildir. The
simplest thing to do would be:
cp -r /home/jhart/Maildir/ /mntpoint/email/home/jhart/
Notice the lack of a * there... you are literally pulling the dir and
everything in it. To preseve perms and timestamps use 'cp -a' instead
of 'cp -r'.
Also make sure we aren't overlooking something completely different,
like the NAS being out of disk space or something.
More information about the Novalug