From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f177.google.com ([209.85.208.177]:44406 "EHLO mail-lj1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728052AbeGaTYR (ORCPT ); Tue, 31 Jul 2018 15:24:17 -0400 Received: by mail-lj1-f177.google.com with SMTP id q127-v6so14443610ljq.11 for ; Tue, 31 Jul 2018 10:42:53 -0700 (PDT) MIME-Version: 1.0 From: Gaurav Sanghavi Date: Tue, 31 Jul 2018 10:42:31 -0700 Message-ID: Subject: Expected Received UUID To: linux-btrfs@vger.kernel.org Content-Type: multipart/alternative; boundary="0000000000007671f105724f1b1d" Sender: linux-btrfs-owner@vger.kernel.org List-ID: --0000000000007671f105724f1b1d Content-Type: text/plain; charset="UTF-8" Hello everyone, While researching BTRFS for a project that involves backing up snapshots from device A to device B before consolidating backups from device B to device C, I noticed that received UUID on snapshot on device C is not the same as received UUID for the same snapshot on device B. Here are my steps: 1. Device A BTRFS version: v3.17 btrfs su sn -r /home/test/snapshot1 /home/test/snaps/snapshot1 btrfs su show /home/test/snaps/snapshot1 Name: snapshot1 uuid: b00e8ba1-5aaa-3641-9c4c-e168eee5c296 Parent uuid: cb570dec-e9fd-1f40-99d2-2070c8ee2466 Received UUID: --- Creation time: 2018-07-30 18:32:37 Flags: readonly 2. Send to Device B btrfs send /home/test/snaps/snapshot1 | ssh 'btrfs receive /home/backups/' After send completes, on Device B BTRFS version: v4.7.3 btrfs su show /home/backups/snapshot1 Name: snapshot1 UUID: 7c13d189-7fee-584e-ac90-e68cb0012f5c Parent UUID: a2314f7c-4b11-ed40-901f-f1acb5ebf802 Received UUID: b00e8ba1-5aaa-3641-9c4c-e168eee5c296 Creation time: 2018-07-30 18:42:37 -0700 Flags: readonly 3. Send to Device C btrfs send /home/backups/snapshot1 | ssh 'btrfs receive /home/backups2/' After send completes, on Device C BTRFS version: v4.7.3 btrfs su show /home/backups2/snapshot1 Name: snapshot1 UUID: 8a13aab5-8e44-2541-9082-bc583933b964 Parent UUID: 54e9b4ff-46dc-534e-b70f-69eb7bb21028 Received UUID: 7c13d189-7fee-584e-ac90-e68cb0012f5c Creation time: 2018-07-30 18:58:32 -0700 Flags: readonly 1. I have gone through some of the archived emails and have noticed people mentioning that if received UUID is set, btrfs send propogates this 'received UUID'. But in above case, it's different for the same snapshot on all three devices. Is this the expected behavior ? 2. We want to be able to start backing up from Device A to C, in case B goes down or needs to be replaced. If received UUID is expected to differ for the snapshot on device B and C, incremental backups will not work from A to C without setting received UUID. I have seen python-btrfs mentioned in a couple of emails; but have anyone of you used it in a production environment ? This is my first post to this email. Please let me know if I am missing any details. Thanks, Gaurav --0000000000007671f105724f1b1d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,=C2=A0

While researching= BTRFS for a project that involves backing up snapshots from device A to de= vice B=C2=A0
before consolidating backups from device B to device= C, I noticed that received UUID on snapshot on=C2=A0
device C is= not the same as received UUID for the same snapshot on device B. Here are = my steps:

1. Device A
BTRFS version: v3.= 17

btrfs su sn -r /home/test/snapshot1 /home/t= est/snaps/snapshot1
btrfs su show /home/test/snaps/snapshot1
<= /div>
Name: snapshot1
uuid: b00e8ba1-5aaa-= 3641-9c4c-e168eee5c296
Pa= rent uuid: cb570dec-e9fd-1f40-99d2= -2070c8ee2466
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Received UUID:=C2=A0 = =C2=A0 =C2=A0 ---
Creatio= n time: 2018-07-30 18:32:37
<= div> Flags: readonly

2. Send to Device= B
btrfs send /home/test/snaps/snapshot1 | ssh <device b> &= #39;btrfs receive /home/backups/'

After se= nd completes, on Device B
BTRFS version: v4.7.3
btrfs s= u show /home/backups/snapshot1
Name: snapshot1
<= div> UUID: 7c13d189-7fee-584e-ac90-e68cb0012f5c
Parent UUID: = a2314f7c-4b11-ed40-901f-f1acb5ebf802
Received UUID: = b00e8ba1-5aaa-3641-9c4c-e168eee5c296
Creation time: 2018-07= -30 18:42:37 -0700
Flags:= readonly


3. Send to Device C
btrfs send /home/backu= ps/snapshot1 | ssh <device c> 'btrfs receive /home/backups2/'=

After send completes, on Device C
BTRFS= version: v4.7.3
btrfs su show /home/backups2/snapshot1<= br>
=
Name: snapshot1
UUID: 8a13aab5-8e44-2541-9082-= bc583933b964
Parent UUID:= 54e9b4ff-46dc-534e-b70f-69eb7bb21= 028
Received UUID: 7c13d189-7fee-584e-ac90-e68cb0012f5c
Creation time: 2018-07-30 18:58:32 -0700
Flags: readonly

1. I have gone through so= me of the archived emails and have noticed people mentioning that
if received UUID is set, btrfs send propogates this 'received UUID'= ;. But in above case,=C2=A0
it's different for the same snaps= hot on all three devices. Is this the expected behavior ?

2. We want to be able to start backing up from Device A to C, in ca= se B goes down or needs=C2=A0
to be replaced. If received UUID is= expected to differ for the snapshot on device B and C, incremental
backups will not work from A to C without setting received UUID. I have = seen python-btrfs
mentioned in a couple of emails; but have anyon= e of you used it in a production environment ?

Thi= s is my first post to this email. Please let me know if I am missing any de= tails.

Thanks,
Gaurav

--0000000000007671f105724f1b1d--