All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Halman <anders.halman@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: [SOLVED] received uuid not set btrfs send/receive
Date: Wed, 20 Jan 2021 19:44:56 -0800	[thread overview]
Message-ID: <66c59dfb-5eaa-656c-f17e-e4ea71e53fa9@gmail.com> (raw)
In-Reply-To: <CAJCQCtRydKSXoYSL15=RHfadWESd_N-ed3eknhbX_95gpfiQEw@mail.gmail.com>

The problem was a corrupt "btrfs send file" or to be more specific, the 
file got corrupt somewhere on the line of transport
To recap the problem for further reference:

check the import (btrfs receive) with the -v option like so:

$ nohup btrfs receive -v -f root.receive.file . &

the import is successful, thus the received uuid is set when you get 
something like ....

$ tail -n1 nohup.out
BTRFS_IOC_SET_RECEIVED_SUBVOL uuid=99a34963-3506-7e4c-a82d-93e337191684, 
stransid=1232187

... after "btrfs receive" is done.

make sure to double check the file size and checksum (md5sum) of "btrfs 
send file" and "btrfs receive file".

I don't know exactly where the corruption happened, but in the second 
attempt I successful combined the import like so:

$ cat x* | pigz -d > root.receive.file


Thanks for the support


Am 17.01.21 um 13:07 schrieb Chris Murphy:
> On Sun, Jan 17, 2021 at 11:51 AM Anders Halman <anders.halman@gmail.com> wrote:
>> Hello,
>>
>> I try to backup my laptop over an unreliable slow internet connection to
>> a even slower Raspberry Pi.
>>
>> To bootstrap the backup I used the following:
>>
>> # local
>> btrfs send root.send.ro | pigz | split --verbose -d -b 1G
>> rsync -aHAXxv --numeric-ids --partial --progress -e "ssh -T -o
>> Compression=no -x" x* remote-host:/mnt/backup/btrfs-backup/
>>
>> # remote
>> cat x* > split.gz
>> pigz -d split.gz
>> btrfs receive -f split
>>
>> worked nicely. But I don't understand why the "received uuid" on the
>> remote site in blank.
>> I tried it locally with smaller volumes and it worked.
> I suggest using -v or -vv on the receive side to dig into why the
> receive is failing. Setting the received uuid is one of the last
> things performed on receive, so if it's not set it suggests the
> receive isn't finished.
>


  parent reply	other threads:[~2021-01-21  4:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 18:49 received uuid not set btrfs send/receive Anders Halman
2021-01-17 19:21 ` Hugo Mills
2021-01-17 21:07 ` Chris Murphy
2021-01-20  3:19   ` Anders Halman
2021-01-21  3:44   ` Anders Halman [this message]
2021-01-18  5:49 ` 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=66c59dfb-5eaa-656c-f17e-e4ea71e53fa9@gmail.com \
    --to=anders.halman@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.