Linux-BTRFS Archive on lore.kernel.org
 help / color / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Eric Mesa <eric@ericmesa.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Issues with btrfs send/receive with parents
Date: Thu, 13 Jun 2019 09:26:10 +0300
Message-ID: <b2bba48e-a759-cb99-cf2c-04e89bce171e@gmail.com> (raw)
In-Reply-To: <2331470.mWhmLaHhuV@supermario.mushroomkingdom>

[-- Attachment #1.1: Type: text/plain, Size: 4247 bytes --]

13.06.2019 2:03, Eric Mesa пишет:
...
>>>
>>> # btrfs sub snap -r /home/ /home/.snapshots/2019-06-10-2353
>>> Create a readonly snapshot of '/home/' in
>>> '/home/.snapshots/2019-06-10-2353'
>>>
>>> # btrfs send -vvv -p /home/.snapshots/2019-06-10-1718/ /home/.snapshots/
>>> 2019-06-10-2353/ | ssh root@tanukimario btrfs receive
>>> /media/backups/backups1/ supermario-home
>>> At subvol /home/.snapshots/2019-06-10-2353/
>>> ERROR: link ermesa/.mozilla/firefox/n35gu0fb.default/bookmarkbackups/
>>> bookmarks-2019-06-10_679_I1bs5PtgsPwtyXvcvcRdSg==.jsonlz4 ->
>>> ermesa/.mozilla/ firefox/n35gu0fb.default/bookmarkbackups/
>>> bookmarks-2019-06-09_679_I1bs5PtgsPwtyXvcvcRdSg==.jsonlz4 failed: No such
>>> file or directory
>>
...
> 
> 
> On the source disk:
> 
> # btrfs subvolume list -qRu /home
> ID 822 gen 3042780 top level 5 parent_uuid c6101e57-acd3-e54c-a957-
> b2b6a033bc42 received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 7247f4a0-6ea2-0d49-b5c5-1ea2ecb8980a path home
> ID 823 gen 3042727 top level 822 parent_uuid -                                    
> received_uuid -                                    uuid f83e53b6-dc88-1a44-
> a5e8-f220d5d21083 path .snapshots
> ID 2515 gen 3008316 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 8ef83478-86be-8a47-a425-1dc6957a0fbe path .snapshots/2019-06-05-postdefrag
> ID 2516 gen 3021663 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> cbb67aec-02ed-8247-afee-38ae94555471 path .snapshots/2019-06-08-1437
> ID 2518 gen 3027353 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> ca361150-1050-5844-bff7-de5c89b5cc05 path .snapshots/2019-06-09-1550
> ID 2519 gen 3028168 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 5fa82b5e-59e1-2549-a939-5dabc99c0f2a path .snapshots/2019-06-09-1944
> ID 2520 gen 3032614 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> df437aaf-0f40-344e-8302-932ea8e5f197 path .snapshots/2019-06-10-1718
> ID 2521 gen 3034140 top level 823 parent_uuid 7247f4a0-6ea2-0d49-
> b5c5-1ea2ecb8980a received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 2b985685-d88b-784a-b870-8f5f8fcdd08c path .snapshots/2019-06-10-2353
> 
> 
> On the destination disk: (I deleted 2019-06-2353 since it wasn't a valid 
> backup and I didn't want to get confused when determining which backups I 
> could delete)
> 
> btrfs subvolume list -qRu /media/backups/backups1/supermario-home
...
> ID 2983 gen 15033 top level 258 parent_uuid -                                    
> received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 7685ff5c-0a72-
> f94e-93d7-7736f68b3ec5 path 2019-06-05-postdefrag
> ID 3545 gen 14310 top level 258 parent_uuid 7685ff5c-0a72-
> f94e-93d7-7736f68b3ec5 received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 26791559-bd47-e44f-9e2f-0ea258615429 path 2019-06-08-1437
> ID 3550 gen 14878 top level 258 parent_uuid 7685ff5c-0a72-
> f94e-93d7-7736f68b3ec5 received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 7c9787bc-fbc4-c146-b88b-e5dd10918eaa path 2019-06-09-1944
> ID 3582 gen 15012 top level 258 parent_uuid 7685ff5c-0a72-
> f94e-93d7-7736f68b3ec5 received_uuid ab1ea98a-b950-2047-802d-3b26568e2e14 uuid 
> 44963c1e-7bc7-f34a-9370-ce180ce05b69 path 2019-06-10-1718
> 

All your snapshots on source have the same received_uuid (I have no idea
how is it possible). If received_uuid exists, it is sent to destination
instead of subvolume UUID to identify matching snapshot. All your backup
sbapshots on destination also have the same received_uuid which is
matched against (received_)UUID of source subvolume. In this case
receive command takes the first found subvolume (probably the most
recent, i.e. with the smallest generation number). So you send
differential stream against one subvolume and this stream is applied to
another subvolume which explains the error.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 23:56 Eric Mesa
2019-06-11  1:10 ` Chris Murphy
2019-06-11  3:39   ` Andrei Borzenkov
2019-06-11  4:19     ` Eric Mesa
2019-06-12  5:43       ` Andrei Borzenkov
2019-06-12 23:03         ` Eric Mesa
2019-06-12 23:11           ` Eric Mesa
2019-06-13  6:26           ` Andrei Borzenkov [this message]
2019-06-13 21:22             ` Eric Mesa
2019-06-14  3:55               ` Chris Murphy
2019-07-14 20:59                 ` Eric Mesa
2019-06-18  4:15               ` Andrei Borzenkov
2019-06-11  3:47   ` Eric Mesa
2019-06-11  1:11 ` Remi Gauvin

Reply instructions:

You may reply publically 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=b2bba48e-a759-cb99-cf2c-04e89bce171e@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=eric@ericmesa.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

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox