Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2003 11:44:26 -0600
From:      Mike Meyer <mwm-dated-1044121467.43bfa2@mired.org>
To:        Francisco Reyes <lists@natserv.com>
Cc:        FreeBSD Questions List <questions@FreeBSD.ORG>
Subject:   Re: Which files and directories to backup?
Message-ID:  <15925.28666.766856.386331@guru.mired.org>
In-Reply-To: <20030126195713.G17637-100000@zoraida.natserv.net>
References:  <15924.28404.975979.636400@guru.mired.org> <20030126195713.G17637-100000@zoraida.natserv.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In <20030126195713.G17637-100000@zoraida.natserv.net>, Francisco Reyes <lists@natserv.com> typed:
> On Sun, 26 Jan 2003, Mike Meyer wrote:
> > It's a bad idea to exclude fstab.
> Why? At one point I had it included and it actually clobered a working one
> and just caused much more headaches.

Because fstab tells you which disks are mounted where. This is
important information, and while you may think you have it memorized,
it's better to have it backed up somewhere.  Overwriting a new copy
with an old backup can be a problem with *any* file you back up, not
just fstab, so that's not really a reason to not back it up.

> I am not planning on doing a full backup/restore so if the machine totally
> dies I can just get back up from it. My plan is more like install new os,
> restore all data in restore directory and merge by hand as needed. This
> has some serious overhead when doing the restore, but given that this is just in case of a
> HD crash I hope it won't need to be done as often.

Actually, that's what I do. I keep all the files I've changed - which
includes /etc/fstab - in perforce. To "restore", I install the new OS
and then have perforce replace all the files stored in it. fstab is
definitely one of the files that get backed up that way.

> Other files won't create as much headaches as fstab if copied over by
> mistake.

Oh yeah? What about rc.conf? Your firewall config, if any? password?
Seems like they *all* create nasty headaches if copied over by
mistake. The solution to that problem is *not* to not back things up,
it's to NOT DO THAT.

> The one time that I copied over fstab after intalling a new HD I
> ended up with a mess that just got me all confused. I guess I don't work
> enough with fdisk and related programs to easily fix /etc/fstab.

fdisk and fstab have little, if anything, to do with each other. If
you can't easily recreate fstab from memory, then you really do need
to back it up.

> I guess I could copy /etc/fstab to /etc/fstab.copy and then back that up.
> This way I have a backup of the file and won't clobber it if I install new
> drive and copy over files by mistake.

Again, the same logic applies to every other file that you back up. Of
course, that doesn't prevent you from copying /etc/fstab.copy over
/etc/fstab, which would have the same results.

> Thanks much. Will check those out. Will include them for now unless I can
> confirm they not been used.

FWIW, as well as the perforce backups, I back up all of / and /var -
actually, /var is on /. It's about 82meg total, and not worth the
trouble of sorting out. I don't back up anything on /usr except the
perforce stuff, as all of that is built from the FreeBSD
distribution. Ports go in /usr/opt, and locally built software goes in
/usr/local, which is backed up.

	<mike
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15925.28666.766856.386331>