From: Robert White <rwhite@pobox.com>
To: linux-btrfs@vger.kernel.org
Subject: Wishlist Item :: re/setable "Snapshot" property
Date: Tue, 14 Oct 2014 16:02:55 -0700 [thread overview]
Message-ID: <543DAB9F.3050403@pobox.com> (raw)
From what I can tell the status of a subvolume as a "snapshot" or not
is a persistent property that has exactly one effect... determining if
the subvolume is listed when using "-s" on btrfs subvol list. That is
the status as "snapshot" or not seems to be largely cosmetic.
It would be useful if that property could read and modified with the
property subcommand. In particular using "btrfs subvol list / -s" as to
track and roll backups is great... until you decide to use one of those
backups to replace a damaged or misused partition.
So lets say you have /home and you make /home_BACKUP_disambiguator_here
snapshots every day and you want to keep the two most recent monthly and
the five most recent daily. The most obvious solution is to get the
current status with the -s option to snapshot list.
Then someone totally trashes home and you want to do the following fast
recovery from snapshot:
btrfs subvol delete /home
btrfs subvolume snapshot /home_BACKUP_relevant_tail /home
__OR__
btrfs subvol delete /home
mv /home_BACKUP_relevant_date /home
btrfs property set /home ro false
At this point there is no way to remove /home from the listing produced
by "btrfs subvol list / -s". This basically breaks the most (only?)
obvious use for the -s filter anyway.
Being able to do a "btrfs property set /home snapshot false" would then
prevent complications in the system maintenance scripts.
At present the only way get a "non-snapshot" subvolume back in place of
/home would be to create a new subvolume with "btrfs subvolume create
/home" and then copy the files out of the backup snapshot long-hand. /Blarg.
The other major use would be copying a complete system using
send/receive and then promoting the received subvolumes out of snapshot
status for the exact same reason in terms of automated backups.
There needs to be a way to manipulate this attribute.
If this attribute has any other purpose, I can't figure out what it is.
reply other threads:[~2014-10-14 23:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=543DAB9F.3050403@pobox.com \
--to=rwhite@pobox.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).