From owner-freebsd-questions@FreeBSD.ORG Mon Aug 24 21:53:18 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCEBD106568B for ; Mon, 24 Aug 2009 21:53:18 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr8.xs4all.nl (smtp-vbr8.xs4all.nl [194.109.24.28]) by mx1.freebsd.org (Postfix) with ESMTP id 485DE8FC08 for ; Mon, 24 Aug 2009 21:53:17 +0000 (UTC) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr8.xs4all.nl (8.13.8/8.13.8) with ESMTP id n7OLrGZZ073284; Mon, 24 Aug 2009 23:53:16 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 7A99BBA7F; Mon, 24 Aug 2009 23:53:16 +0200 (CEST) Date: Mon, 24 Aug 2009 23:53:16 +0200 From: Roland Smith To: Maxim Khitrov Message-ID: <20090824215316.GC43410@slackbox.xs4all.nl> References: <26ddd1750908240857gb2973b8h7bc06e0a92b82859@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: <26ddd1750908240857gb2973b8h7bc06e0a92b82859@mail.gmail.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Free BSD Questions list Subject: Re: Continuous backup of critical system files 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: Mon, 24 Aug 2009 21:53:18 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 24, 2009 at 11:57:25AM -0400, Maxim Khitrov wrote: > Hello all, >=20 > I'm setting up a firewall using FreeBSD 7.2 and thought that it may > not be a bad idea to have a continuous backup for important files like > pf and dnsmasq configurations. > My initial thought was to create a mercurial repository at the file > system root and exclude everything except for explicitly added files. > I'd then run something like "hg commit -m `date`" from cron every 10 > minutes to record the changes automatically.=20 Isn't this ass-backwards? Configuration files shouldn't change suddenly. My system is to keep all configuration files that I have changed from their defaults in a revision control system repository. That is where I add and (after testing) commit changes to those files. I then use an install script= to copy changed files (based on SHA1 checksum) to their correct location in /e= tc or /usr/local/etc and run restart commands if necessary. So installation is always done from the repository to the filesystem. If a change doesn't work= I just check out the last good version of the file(s), re-run the install scr= ipt and we're back to normal. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkqTC8wACgkQEnfvsMMhpyW2zACfYfTHn/fHLf6i9mgwnAkB0K2Z SRcAnjZNxWtZfuHhbgtMGauF99PsFNX2 =Wn99 -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu--