Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2009 17:25:34 +0100
From:      chris scott <kraduk@googlemail.com>
To:        Maxim Khitrov <mkhitrov@gmail.com>
Cc:        Free BSD Questions list <freebsd-questions@freebsd.org>
Subject:   Re: Continuous backup of critical system files
Message-ID:  <d36406630908240925p359963eax419a792f0e51f94d@mail.gmail.com>
In-Reply-To: <d36406630908240924t53240b51geb130c454488ca8e@mail.gmail.com>
References:  <26ddd1750908240857gb2973b8h7bc06e0a92b82859@mail.gmail.com> <d36406630908240924t53240b51geb130c454488ca8e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/8/24 chris scott <kraduk@googlemail.com>

>
>
> 2009/8/24 Maxim Khitrov <mkhitrov@gmail.com>
>
> Hello all,
>>
>> 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. By continuous I mean some script that
>> would be triggered every few minutes from cron to automatically create
>> a backup of any monitored file if it was modified. I also have a full
>> system backup in place that is executed daily (dump/restore to a
>> compact flash card), so the continuous backup would really be for
>> times when someone makes a mistake editing one of the config files and
>> needs to revert it to a previous state.
>>
>> 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. Can anyone think of a
>> better way to do this (existing port specifically for this purpose)?
>> Obviously, I need a way to track the history of a file and revert to a
>> previous state quickly. The storage of changes should be as
>> size-efficient as possible.
>>
>> - Max
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "
>> freebsd-questions-unsubscribe@freebsd.org"
>>
>
> I rsync all my system files to a filer running zfs. I have a separate zfs
> fs for every host and then I snapshot the fs after the rsync. We then keep
> 35 snapshots for retention as we do daily rsyncs.
>
>
> You might want more of a rolling snapshot policy. Keep on for every 10 mins
> of the last hour, then drop it to hourly for the next 6 hours, then daily,
> then weekly etc
>
> Works quite well. We have also found it  handy for forensics as well, when
> we have had a fault
>

i forgot to say it need not be a zfs backend just a fs that you can reliably
do snapshots



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