[nycbug-talk] zfs backup scripts?

Charles Sprickman spork at bway.net
Sat Jan 9 20:33:48 EST 2010


On Sat, 9 Jan 2010, Isaac Levy wrote:

> On Jan 9, 2010, at 12:17 AM, Charles Sprickman wrote:
>
>> On Fri, 8 Jan 2010, Isaac Levy wrote:
>> 
>>> Hi Charles,
>>> 
>>> On Jan 8, 2010, at 3:26 AM, Charles Sprickman wrote:
>>> 
>>>> Howdy,
>>>> There's lots of stuff out there, but I'm looking for something that 
>>>> basically works like "rsnapshot", but rather than doing all the linking 
>>>> magic rsnapshot does, it uses zfs snapshots (and has a nice retention 
>>>> config for daily/weekly/yearly snapshots)...
>>>> Has anyone found such a beast?  This might very well be a case of 
>>>> everyone rolling their own, as that's what I'm tempted to do at this 
>>>> point, and I'm not a big fan of writing something when it already exists.
>>>> Thanks,
>>>> Charles
>>> 
>>> 
>>> Been using ZFS for both our NFS servers and backup machines, and we rolled 
>>> our own scripts to snapshot the volumes, pulled from cron.
>> 
>> OT a bit, but FreeBSD or Solaris?
>
> FreeBSD 7.1 (very conservative builds), and we're slowly moving the storage 
> systems to 8.0, where ZFS is no longer listed as 'experimental'.
> All on huge greybox Intel hardware.
>
>> Are you happy with the stability of the whole kit and kaboodle?
>
> Absolutely.

Good to know.  Since this is strictly a server for backups (well, and some 
jails as hot standbys...), I'm going with 8.0 in hopes that the new ZFS 
stuff fixes more bugs than 8.0 in general introduces.

>>> The hardest part was getting people various groups to come clean on their 
>>> backup needs, so we could get the frequency vs. storage needs to fit our 
>>> budget.
>> 
>> That I'm OK with.  What I hate is any type of perl or shell script that has 
>> to deal with days, weeks, months and years.  I've got a serious mental 
>> block on that stuff.. Most of my time hacking this mess together will be 
>> looking for perl modules I imagine.
>
> I believe we did it all in shell scripts without much grief, and any perl we 
> use has no add-on modules.

I hate doing date/time conversion.  It makes me nuts.  I want "human 
readable" snapshot names, so I have to delve into all that mess of turning 
things like tank/backup at Thursday into something usable.  I just hate that.

>> 
>> I am finding a TON of "rolling snapshot" scripts, but I really want to come 
>> closer to emulating a good old-fashioned backup setup that lets me keep X 
>> yearly, Y monthly, Z weekly and ZZ daily sets of backups.  Gnash gnash 
>> gnash.
>
> May I suggest dropping shell scripts into /etc/periodic/daily , weekly , 
> monthly?
>
> Reliable, portable, easy- IMHO.

I've found some bits to cobble together for a short term solution.  Long 
term, I'm reading through the rsnapshot script (which is what I want to 
emulate anyhow), and I think it's possible for me to hack that thing into 
a zfs backup system.  It's well-written and very well-commented.  In 
short, I need to make subroutines for zfs snapshot listing, creation and 
deletion and then figure out how to swap those out for rsnapshot's 
directory creation/rotation/hardlinking stuff.  It looks totally possible, 
and there's plenty of stuff worth re-using in rsnapshot.

Wish me luck. :)

C

> Rocket-
> .ike
>
>
>
>> 
>> C
>> 
>>> Best,
>>> .ike
>>> 
>>> 
>> 
>



More information about the talk mailing list