From owner-freebsd-questions@FreeBSD.ORG Tue May 24 23:25:19 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB48A16A41C for ; Tue, 24 May 2005 23:25:19 +0000 (GMT) (envelope-from lisa@jellico.com) Received: from radius.jellico.com (mail.jellico.com [63.162.128.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 555AC43D1D for ; Tue, 24 May 2005 23:25:18 +0000 (GMT) (envelope-from lisa@jellico.com) Received: from IPCheck (lisa.jellico.com [63.162.128.213]) by radius.jellico.com (8.13.1/8.13.1) with ESMTP id j4ONPYaG062847 for ; Tue, 24 May 2005 19:25:36 -0400 (EDT) Received: from 127.0.0.1 (AVG SMTP 7.0.322 [266.11.16]); Tue, 24 May 2005 19:24:45 -0400 Message-ID: <004001c560b7$c51c3910$d580a23f@lisac> From: "Lisa Casey" To: Date: Tue, 24 May 2005 19:24:38 -0400 Organization: Netlink 2000, Inc. X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original Subject: moving /var/mail to another machine X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 23:25:19 -0000 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