Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 May 2005 19:24:38 -0400
From:      "Lisa Casey" <lisa@jellico.com>
To:        <freebsd-questions@freebsd.org>
Subject:   moving /var/mail to another machine
Message-ID:  <004001c560b7$c51c3910$d580a23f@lisac>

next in thread | raw e-mail | index | archive | help
Hi,

I want to move all of the mailboxes (all of /var/mail/*) on one machine to 
another one across a network. I need to preserve permissions, uid's and 
gud's. (It would probably be good to preserve modification times as well). I 
can move a file using scp, but it doesn't preserve uid/gid

I found this page:  http://www.unixguide.net/ibm/faq/faq1.604.shtml  which 
says I can do either:

$rsh RemoteHost "cd TargetDir; tar -cBf - ." | tar -xvBf -

or

rcp -rp host1:/dir host2:/dir

I'm trying it using a users home directory first just to make sure I can get 
this right, but so far I'm not having much luck.

Could someone here suggest the best way for me to move these mailboxes (and 
perhaps help me out a little with the actual syntax of the command I would 
use)?

I realise that there will be a problem with mailboxes that don't have 
usernames on the remote system (the system I'm copying the mailboxes to) but 
most of the users currently exist on the remote system, it will be easy 
enough to do a adduser to add in those that aren't already on there.

I hope I'm explaining myself clearly here, it's been a long day already  :-)

Thanks,

Lisa

 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.16 - Release Date: 5/24/2005




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004001c560b7$c51c3910$d580a23f>