From: Graham Cobb <g.btrfs@cobb.uk.net>
To: Eric Levy <contact@ericlevy.name>, linux-btrfs@vger.kernel.org
Subject: Re: receive failing for incremental streams
Date: Wed, 15 Dec 2021 23:35:19 +0000 [thread overview]
Message-ID: <55ddb05b-04ad-172e-bda7-757db37a37b2@cobb.uk.net> (raw)
In-Reply-To: <03e34c5431b08996476408303a9881ba667083ed.camel@ericlevy.name>
On 15/12/2021 20:27, Eric Levy wrote:
> Hello.
>
> I have been experiencing very confusing problems with incremental
> streams.
There is no such thing as an incremental stream. Send sends all the
information necessary to create a subvolume. Some of that includes
instructions to share data in other subvolumes but it is not incremental.
> For a subvolume, I have a simple incremental backup created from two
> stages:
>
> btrfs send old/@ > base.btrfs
> btrfs send new/@ -p old/@ > update.btrfs
>
> The two source subvolumes are snapshots captured at separate times from
> the same actively mounted subvolume.
>
> On the target, I attempt to restore:
>
> btrfs receive ./ < base.btrfs
> btrfs receive ./ < update.btfs
>
> The expectation is that the prior command would create a restored
> snapshot of the initial backup stage,
Yes
> and that the latter would apply
> the updated stage.
No. Receive always creates a brand new subvolume - it doesn't update
anything. Of course, the new subvolume may include clones of data stored
in other subvolumes but it doesn't modify any existing subvolumes.
>
> The prior command succeeds, but the latter fails:
>
> ERROR: creating snapshot ./@ -> @ failed: File exists
>
> Since it is obvious I cannot usefully apply the second stage to a
> target that does not exist, I am puzzled about why the process performs
> this check, as well as what is expected to have success applying the
> update.
>
> How may I apply the update stage to the target generated from restoring
> the initial stage?
You don't. Receive will create a new subvolume - which will include
unchanged data from the initial stage and whatever changes have
happened. If you want, you can then snapshot that (read-only or
read-write as you wish) into any position you want in your destination
filesystem.
Graham
next prev parent reply other threads:[~2021-12-15 23:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 20:27 receive failing for incremental streams Eric Levy
2021-12-15 23:35 ` Graham Cobb [this message]
2021-12-15 23:52 ` Eric Levy
2021-12-16 0:55 ` Graham Cobb
2021-12-16 1:13 ` Eric Levy
2021-12-16 10:24 ` Graham Cobb
2021-12-16 11:38 ` Hugo Mills
2021-12-18 23:53 ` Eric Levy
2021-12-16 5:36 ` Andrei Borzenkov
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=55ddb05b-04ad-172e-bda7-757db37a37b2@cobb.uk.net \
--to=g.btrfs@cobb.uk.net \
--cc=contact@ericlevy.name \
--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).