From owner-freebsd-questions Sun Jan 18 07:28:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA14759 for questions-outgoing; Sun, 18 Jan 1998 07:28:04 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mailc.telia.com (root@mailc.telia.com [194.22.190.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA14728 for ; Sun, 18 Jan 1998 07:27:57 -0800 (PST) (envelope-from girgen@partitur.se) Received: from d1o62.telia.com (root@d1o62.telia.com [195.198.198.241]) by mailc.telia.com (8.8.8/8.8.5) with ESMTP id QAA07032; Sun, 18 Jan 1998 16:17:56 +0100 (MET) Received: from partitur.se (t1o62p44.telia.com [195.198.198.44]) by d1o62.telia.com (8.8.5/8.8.5) with ESMTP id QAA12937; Sun, 18 Jan 1998 16:17:47 +0100 (MET) Message-ID: <34C21D1F.999640C5@partitur.se> Date: Sun, 18 Jan 1998 16:17:51 +0100 From: Palle Girgensohn Organization: Partitur X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 2.2.5-STABLE i386) MIME-Version: 1.0 To: Michael Haro CC: freebsd-questions@FreeBSD.ORG Subject: Re: backup References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk Michael Haro wrote: > > Hi, I was wondering what the best way to backup /var/mail is. > Currently I make a tar of it and save the tar on a different HD. The only > problem I have is that if you finger a user, it says they last checked > their email at the time the tar tar'ed their mailbox. > > Any idea how to fix this problem? I'd rather have finger report the > proper time. > > Thanks, > Michael Hi Michael, Try using 'dump' to a file on the second HD (or maybe 'dd'). dump 0f /hd2/file /dev/vardevice This way, you backup the entire /var; in fact, you must backup an entire file system, so unless var is it's own filesystem (it usually is), you need to backup the whole root fs... You don't have to use the device name if you have a modern system; /var is OK if it's in /etc/fstab. If you want to use gzip, try dump 0f - /var | gzip >/hd2/file.gz To restore, use 'restore': zcat /dh2/file.gz | restore if - for interactive restore. Check the man pages for more info. Also, I'm not sure what this tar option does, but *might* be able to use it: (from the tar manpage, fbsd 2.2.5:) --atime-preserve Restore the access times on files which are writ- ten to tape (note that this will change the in- ode-change time!). Good luck /Palle