From owner-freebsd-questions@FreeBSD.ORG Wed May 25 00:40:09 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 9EA8E16A41C for ; Wed, 25 May 2005 00:40:09 +0000 (GMT) (envelope-from chad@shire.net) Received: from hobbiton.shire.net (hobbiton.shire.net [166.70.252.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 600E343D48 for ; Wed, 25 May 2005 00:40:09 +0000 (GMT) (envelope-from chad@shire.net) Received: from [67.161.222.227] (helo=[192.168.99.68]) by hobbiton.shire.net with esmtpa (Exim 4.43) id 1DajwO-000OR8-IC; Tue, 24 May 2005 18:40:08 -0600 In-Reply-To: <004001c560b7$c51c3910$d580a23f@lisac> References: <004001c560b7$c51c3910$d580a23f@lisac> Mime-Version: 1.0 (Apple Message framework v730) X-Priority: 3 Message-Id: <1D53733C-BC53-434D-B9AC-DD2B8371E78E@shire.net> From: "Chad Leigh -- Shire.Net LLC" Date: Tue, 24 May 2005 18:40:07 -0600 To: Lisa Casey X-Mailer: Apple Mail (2.730) X-SA-Exim-Connect-IP: 67.161.222.227 X-SA-Exim-Mail-From: chad@shire.net Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on hobbiton.shire.net X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50 autolearn=disabled version=3.0.0 X-Spam-Level: X-SA-Exim-Version: 4.1+cvs (built Mon, 23 Aug 2004 08:44:05 -0700) X-SA-Exim-Scanned: Yes (on hobbiton.shire.net) Cc: freebsd-questions@freebsd.org Subject: Re: 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: Wed, 25 May 2005 00:40:09 -0000 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@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 ???? Chad