All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: OK to take hourly snapshots, then cull older ones?
Date: Tue, 15 Oct 2013 04:47:04 +0000 (UTC)	[thread overview]
Message-ID: <pan$73762$c90bc02$92b3c08c$d729ddd6@cox.net> (raw)
In-Reply-To: 525CBF0D.1020609@mersenne.com

David Madden posted on Mon, 14 Oct 2013 21:05:33 -0700 as excerpted:

> I'd like to use BTRFS to do something like the old NetApp snapshot
> system:
> every hour or so, there'd be a snapshot, then the 23 of the snapshots
> during a day would be deleted, leaving just a day snapshot, then after a
> month, 6 of 7 snapshots would be deleted, leaving just a week snapshot,
> and so on.
> 
> Is this a reasonable thing to do in a cron job with a BTRFS filesystem?
> Apart from running out of space, are there any resources that might get
> used up?  Has anybody done this for a year or two in an active
> filesystem, and encountered success or weirdness?

There's discussion of this idea along with links to existing tools/
scripts for it, on the wiki:

https://btrfs.wiki.kernel.org

In particular, see documentation, guides and usage, use cases,
2. snapshots and subvolumes, 2.2. backups/time-machine.  However, that 
you didn't already know that was covered indicates that you either 
weren't aware of the wiki, or haven't read much on it recently, so 
there's likely a lot more information there that you'll find useful if 
you spend some time looking around and reading.

(I haven't done a whole lot with snapshotting myself as it doesn't fit my 
use case very well, but I knew about it from reading the wiki and had 
tagged it in my mind to look up again later should I need the 
information, so it was a matter of just a few seconds to find it again 
and type the path above so you could find it too.  Since I /haven't/ done 
much with snapshotting myself, I can't help much in saying which of the 
listed tools will be easiest, but that script link points at a list post 
with a pre-made script and crontab entries that look like they do just 
about exactly what you outline. =:^)

-- 
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


  parent reply	other threads:[~2013-10-15  4:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  4:05 OK to take hourly snapshots, then cull older ones? David Madden
2013-10-15  4:43 ` Marc MERLIN
2013-10-15  4:47 ` Duncan [this message]
2013-10-15  4:53 ` Roman Mamedov
2013-10-15  5:05   ` David Madden
2013-10-15  5:14     ` Avi Miller
2013-11-03 11:50 ` Matthias G. Eckermann
2013-11-05  2:51   ` Marc MERLIN
2013-11-06  0:08     ` Matthias G. Eckermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='pan$73762$c90bc02$92b3c08c$d729ddd6@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.