From: Anand Jain <Anand.Jain@oracle.com>
To: 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 17:24:10 +0800 [thread overview]
Message-ID: <4E4B88BA.4030603@oracle.com> (raw)
In-Reply-To: <4E4B2452.9070407@oracle.com>
And a rough implementation design is here below. (As of now this does
not include the GNOME integration since I have no idea how to do that).
Further, implementation will contain 2 new files
/etc/init.d/btrfs and /<path>/btrfs-auto-snapshot,
any idea where does a file like btrfs-auto-snapshot should be placed
(with its purpose as mentioned below).
-------
1.
File: /etc/init.d/btrfs :
This will contain the global start and stop knob
(something like `service btrfs start`)
2.
Crontab: Upon start, crontab will be updated with something like the
following.
every 15min `<path>/btrfs-auto-snapshot cleanup>`
every 15min `/<path>/btrfs-auto-snapshot 15min`
every hr `/<path>/btrfs-auto-snapshot hr`
every day `/<path>/btrfs-auto-snapshot day`
every month `/<path>/btrfs-auto-snapshot month`
every year `/<path>/btrfs-auto-snapshot year`
3.
File: /<path>/btrfs-auto-snapshot :
to process the call from cronjob.
- check the config and check the target fs for the snapshot
- check the space in the target FS
- call btrfs cli to take snapshot (provide src and destination)
- check if snapshot cleanup is required
to process the calls from '/etc/init.d/btrfs'
configuration setting.
- to set which btrfs fs will participate in the auto-snapshot
- to indicate if auto snapshot has to stop when target FS is 80% full
---------
Thanks, Anand
On 08/17/2011 10:15 AM, Anand Jain wrote:
>
> sorry forgot to follow the protocol, now included RFC in the subject.
>
>
> Hi,
>
> Appears that no one is working on the auto-snapshot feature for btrfs,
> so here I am implementing the same.
>
> Below is a draft on the feature list. Any comments / questions /
> suggestions are welcome, please do let me know.
>
> btrfs auto snapshot feature will include:
> Initially:
> - configurable timely snapshots
> - uses services and crontab to schedule
> - Gnome integration
> - snapshot rollback and cleanups
> - snapshot trashing based on available space
> - snapshot destination will be subvol/.btrfs/snapshot@<time> and
> snapshot/.btrfs/snapshot@<time> for subvolume and snapshot
> respectively
>
> Later:
> -integration with (a ?) backup software
> - snapshot trashing per backup confirmation
> - rollback from the backup server
>
> Challenges:
> - rollback per file or dir instead of entire snapshot-rollback ?
> - integrating into the btrfs gui ?
> - some FS (samfs) support continues backup
> - do we need a new role for the snapshot management ? zfs does.
> - we don't need a snapshot if the master file-system didn't change
> at all
> - snapshots are writable by default, hope that sudo-er doesn't
> modify the snapshot - do we need to implement a kind of read-only
> snapshot ?
>
> Thanks, -Anand
> --
> 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
next prev parent reply other threads:[~2011-08-17 9:24 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 [this message]
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
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=4E4B88BA.4030603@oracle.com \
--to=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).