Re: Understanding btrfs and backups => automatic snapshot script

Duncan
2014-03-21T07:41:34Z

Marc MERLIN posted on Thu, 20 Mar 2014 22:57:33 -0700 as excerpted:

> On Sun, Mar 16, 2014 at 10:42:24PM -0700, Marc MERLIN wrote:
>> On Thu, Mar 06, 2014 at 09:33:24PM +0000, Duncan wrote:
>> > However, best snapshot management practice does progressive snapshot
>> > thinning, so you never have more than a few hundred snapshots to
>> > manage at once.
>>
>> I'm happy to share my script with others if that helps:
>> http://marc.merlins.org/linux/scripts/btrfs-snaps
>
> Now added to
> http://marc.merlins.org/perso/btrfs/post_2014-03-21_Btrfs-Tips_-How-To-
Setup-Netapp-Style-Snapshots.html

Hmm... I hadn't actually looked that closely at scripted snapshotting.
Now that I did, and see how easy it is to manage both snapshotting and
thinning, I just might.

But I recently switched to systemd, including replacing my crons with
timer-unit scripts (which I setup like cron.hourly.d, daily.d, etc, but
didn't have but those two to worry about, so didn't setup weekly or
beyond). I've not actually unmerged cron yet, but I probably will one of
these days. Anyway, I might well find myself setting up weekly/quarterly/
whatever too, with your script or something like it modified for systemd-
timer usage. It'd give me an excuse to practice my unit-file setup
skills some more. =:^)

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman