Date: Sun, 18 Jan 1998 16:17:51 +0100 From: Palle Girgensohn <girgen@partitur.se> To: Michael Haro <perl@netmug.org> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: backup Message-ID: <34C21D1F.999640C5@partitur.se> References: <Pine.BSF.3.96.980116193125.23395A-100000@netmug.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34C21D1F.999640C5>