linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Lai <m@matthewlai.ca>
To: linux-btrfs@vger.kernel.org
Subject: Re: Receive on same subvolume
Date: Mon, 03 Feb 2014 14:53:21 -0800	[thread overview]
Message-ID: <52F01DE1.7030102@matthewlai.ca> (raw)
In-Reply-To: <8BD36B4A-F9AF-40C6-81B8-85FD14CD5EA1@colorremedies.com>

On 03/02/2014 11:26 AM, Chris Murphy wrote:
> On Feb 3, 2014, at 11:19 AM, Matthew Lai <m@matthewlai.ca> wrote:
>
>> Thanks. I should clarify what I'm trying to do.
>>
>> I'm trying to use btrfs send for backup, without having another btrfs volume.
>>
>> So the initial backup is a complete send, piped to Amazon Glacier (so my machine never has the whole file, and doesn't have space for one).
> OK so you've use btrfs send piped to Glacier which creates a *file*, I'll call it "initial", not a navigable directory of files? Right?
That is correct.
>> It looks like the problem now is the sent file can't be applied to the original volume (for restore).
> I'm counting two sent files: initial, increment1. I'm not sure which one you're applying. If you have the exact same read-only snapshot that the btrfs send file "initial" is based on, then you'd apply the increment1 to that read-only snapshot which will cause a new read-only snapshot to be created with the incremental data applied to it. The error you're getting sounds like the parent read-only snapshot isn't available?
>
That is also correct. There are 2 sent files. I am trying to apply 
increment1, on a snapshot of the parent (that was used to create 
increment1).

I added -vv. Here is the test script for reproducing this entire setup.

-----------------------------------------------------------------------
#!/bin/sh

btrfs subvolume create data
btrfs subvolume snapshot -r data first_backup
touch data/a
btrfs subvolume snapshot -r data second_backup
btrfs send -p first_backup second_backup > increment
btrfs subvolume snapshot first_backup first_backup_rw
btrfs receive -vv first_backup_rw < increment
-----------------------------------------------------------------------

Output:
-----------------------------------------------------------------------
Create subvolume './data'
Create a readonly snapshot of 'data' in './first_backup'
Create a readonly snapshot of 'data' in './second_backup'
At subvol second_backup
Create a snapshot of 'first_backup' in './first_backup_rw'
At snapshot second_backup
receiving snapshot second_backup 
uuid=e6159a2a-3430-344a-a23d-b9bb83851a63, ctransid=28 
parent_uuid=20c4ff66-a9ec-fc44-93c6-2c12637e95e6, parent_ctransid=26
ERROR: could not find parent subvolume
-----------------------------------------------------------------------

I would think applying the "patch" to first_backup_rw should succeed, 
because it's exactly the same as first_backup, which is the parent for 
the send, but it doesn't.

Thanks
Matthew

  reply	other threads:[~2014-02-03 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 21:26 Receive on same subvolume Matthew Lai
2014-02-03 13:18 ` Felix Blanke
2014-02-03 17:30 ` Chris Murphy
2014-02-03 18:19   ` Matthew Lai
2014-02-03 19:26     ` Chris Murphy
2014-02-03 22:53       ` Matthew Lai [this message]
2014-02-04  0:34         ` Chris Murphy
2014-02-04  1:06           ` Matthew Lai

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=52F01DE1.7030102@matthewlai.ca \
    --to=m@matthewlai.ca \
    --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).