moving /var/mail to another machine

Chad Leigh -- Shire.Net LLC chad at shire.net
Tue May 24 18:32:16 PDT 2005


On May 24, 2005, at 6:40 PM, Chad Leigh -- Shire.Net LLC wrote:

>
> On May 24, 2005, at 5:24 PM, Lisa Casey wrote:
>
>
>> 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
>>
>
>
> Can't you  just do
>
> cd /var/mail
> tar cpf /tmp/var_mail.tar *
>
> scp /tmp/var_mail.tar user at host:
>
> ssh to the new host
>
> cd /var/mail
> rm -rf *    # if you want to clean out the existing /var/mail on  
> the new machine
> tar xpf ~user:var_mail.tar

sorry  typo above

should be

tar xpf ~user/var_mail.tar

Chad

>
> ????
>
> Chad
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions- 
> unsubscribe at freebsd.org"
>



More information about the freebsd-questions mailing list