linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthias G. Eckermann" <mge@suse.com>
To: Anand Jain <Anand.Jain@oracle.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Cc: Chris Mason <chris.mason@oracle.com>
Subject: Re: [RFC] btrfs auto snapshot
Date: Wed, 17 Aug 2011 15:31:08 +0200	[thread overview]
Message-ID: <20110817133108.GA24578@suse.com> (raw)
In-Reply-To: <4E4B2452.9070407@oracle.com>

Hello Anand and all,

On 2011-08-17 T 10:15 +0800 Anand Jain wrote:
=20
>  Appears that no one is working on the auto-snapshot feature for
>  btrfs, so here I am implementing the same.

thanks for bringing this up! The group of features you are listing is
indeed of high interest for people using btrfs.

That said, not only have other people though about this, but a lot of
your question already have been implemented in "snapper", and open
source infrastructure developed as part of openSUSE and SUSE Linux
Enterprise.

Please see:
	http://en.opensuse.org/Portal:Snapper
	http://en.opensuse.org/openSUSE:Snapper_install
	http://lizards.opensuse.org/2011/04/01/introducing-snapper/

Source code is here:
	http://gitorious.org/opensuse/snapper

"snapper" will be part of openSUSE 12.1 and SUSE Linux Enterprise 11
Service Pack 2, and is available as part of the respective Beta
releases and Milestones already.

snapper's concept in short:
- shared library to make the functionality available to
  other tools as well
- libsnapper is implemented on top of the btrfsprogs
- cmdline tool "snapper"
- global configuration file
	/etc/sysconfig/snapper
- one configuration file per subvolume to be snapshotted
	/etc/snapper/configs/<config-name>
  I call this a "single configuration" going forward.
  Here also policies for time based snapshotting and
  cleanup are to be configured.
- Integration into SUSE's management framework (YaST2/zypper),
  however, "snapper" should work independent of those,
  i.e. usable on other distributions easily.

>  Below is a draft on the feature list.  Any comments / questions /
>  suggestions are welcome, please do let me know.

Let me go through the single features quickly and list the matching
snapper functionality.
=20
>  btrfs auto snapshot feature will include:
>  Initially:
>      - configurable timely snapshots

Yes. Configured per single configuration

>      - uses services and crontab to schedule

Yes.

>      - Gnome integration

I more see a need for integration into systems management frameworks.

>      - snapshot rollback and cleanups

Yes. Rules for cleanups (time based, number of snapshots)
per single configuration.

>      - snapshot trashing based on available space

// not yet done.

>      - snapshot destination will be subvol/.btrfs/snapshot@<time> and

snapshot destination is "/.snapshots/<number>/",=20

>        snapshot/.btrfs/snapshot@<time> for subvolume and snapshot
>        respectively

Timestamp and Description of a snapshot are stored in a small XML
file /.snapshots/<number>/info.xml". One small file per snapshot.

[...]

>  Challenges:
>    - rollback per file or dir instead of entire snapshot-rollback ?

snapper implements  "rollback" on a FILE level only.

To differentiate this way of "rolling back" from jumping
into another snapshot, we call it
	"undochange"
for now. This keeps the option to also manage a full
per snapshot-rollback in a later point int time.

[...]
>      modify the snapshot - do we need to implement a kind of read-onl=
y
>      snapshot ?

snapper treats snapshots as read only snapshots, i.e. when doing a
rollback - aehem, I should say "undochange" - only the "master" volume
will be changed, not the single snapshots.  We are aware that this has
pros and cons. But that's another discussion.

I hope that this is a starting point for you.

Enjoy "snapper".

so long -
	MgE

--=20
Matthias G. Eckermann     Senior Product Manager   SUSE=C2=AE Linux Ent=
erprise
SUSE LINUX Products GmbH  Maxfeldstra=C3=9Fe 5          90409 N=C3=BCrn=
berg Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer, HRB 16746 (AG N=C3=
=BCrnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-08-17 13:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17  2:15 [RFC] btrfs auto snapshot Anand Jain
2011-08-17  9:24 ` Anand Jain
2011-08-17 13:23   ` David Pottage
2011-08-18 10:11     ` Anand Jain
2011-08-17 19:56   ` Lenz Grimmer
2011-08-17 13:31 ` Matthias G. Eckermann [this message]
2011-08-18 10:07   ` Anand Jain
2011-08-17 14:04 ` Dave
2011-08-17 14:50   ` Ken A
2011-08-17 17:38     ` Matthias G. Eckermann
2011-08-17 21:56       ` Matthias G. Eckermann
2012-02-23  9:54       ` Fajar A. Nugraha
2012-03-01 13:48         ` Arvin Schnell
2012-03-01 14:13           ` Fajar A. Nugraha
2011-08-17 15:13   ` snapshot ctime // " Roman Mamedov
2011-08-17 15:56     ` Jérôme Poulin
2011-08-18 10:14       ` Anand Jain
2012-02-23 10:37 ` Hubert Kario
2012-02-23 12:02   ` Anand Jain
2012-02-23 12:13     ` Fajar A. Nugraha
2012-02-23 14:09       ` Matthias G. Eckermann
2012-02-23 13:24     ` Hubert Kario
2012-02-24  6:05       ` Anand Jain
2012-02-24  5:59         ` Fahrzin Hemmati

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=20110817133108.GA24578@suse.com \
    --to=mge@suse.com \
    --cc=Anand.Jain@oracle.com \
    --cc=chris.mason@oracle.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).