From: Wolfgang Mader <Wolfgang_Mader@brain-frog.de>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Recursive delete file from all subvolumes (snapshots)
Date: Fri, 15 Jan 2016 10:11:05 +0100 [thread overview]
Message-ID: <1627987.rImNt6gQkd@discus> (raw)
In-Reply-To: <20160115140539.3afa66f0@natsu>
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
On Friday, January 15, 2016 2:05:39 PM CET Roman Mamedov wrote:
> On Fri, 15 Jan 2016 09:33:14 +0100
>
> Wolfgang Mader <Wolfgang_Mader@brain-frog.de> wrote:
> > I have a btrfs raid 10 from which I take hourly snapshots using snapper.
> > Now, I wonder, if there is a way to delete a file together with all its
> > occurrences in all snapshots.
> >
> > My use case is, that the file I want to delete is large, and I want to
> > free its space on disk. Thus, I have to get rid of its "live" version but
> > also of all references to it in snapshots.
>
> E.g. if your file is at /path/to/file.dat, and your snapshot structure is
> /snapshots/YYYY-MM-DD@time/, you would simply do:
>
> rm /snapshots/*/path/to/file.dat
>
> In fact this is what I often do with my timed snapshots when deleting some
> files and wanting to recover free space immediately, not waiting for all
> their snapshots to expire and get deleted by the usual time-based deletion
> rules.
>
> If your snapshots are read-only it becomes more complex, but still doable.
Neat idea.
Thx.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-01-15 9:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 8:33 Recursive delete file from all subvolumes (snapshots) Wolfgang Mader
2016-01-15 9:05 ` Roman Mamedov
2016-01-15 9:11 ` Wolfgang Mader [this message]
2016-01-15 11:48 ` Duncan
2016-01-15 13:33 ` Wolfgang Mader
2016-01-15 15:25 ` Duncan
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=1627987.rImNt6gQkd@discus \
--to=wolfgang_mader@brain-frog.de \
--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).