[Novalug] Having problems copying data using cp over nfs

Ken Kauffman kkauffman@headfog.com
Mon Jun 18 21:54:03 EDT 2007


don's idea is better

donjr wrote:
> On Mon, 2007-06-18 at 20:49 -0400, 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?
>>
>> TIA,
>>
>> Jay Hart
>>     
>
> Because some{most} Maildir layouts use folder{directory} names that
> start with a .{dot}( or invisible) and your command skipped those
> folders.
>
> Try the command combo:
>  $ WRK="/home/jhart/Maildir"
>  $ (cd $WRK && tar cf - . ) | (cd /mntpoint/email/$WRK && tar xvfp - )
>
> This uses 'tar' {the tar archiving utility} to get those "invisible"
> files and directories, plus it may even be a little faster then a simple
> cp.
>
> --  
>   



More information about the Novalug mailing list