All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: "Anand Jain" <anand.jain@oracle.com>,
	"Swâmi Petaramesh" <swami@petaramesh.org>,
	"Linux BTRFS Mailinglist" <linux-btrfs@vger.kernel.org>
Subject: Re: Cloning / getting a full backup of a BTRFS filesystem
Date: Thu, 5 Sep 2019 21:06:43 +0800	[thread overview]
Message-ID: <F4DE0ABD-51B3-4BBC-B26D-3599A78ED1E4@oracle.com> (raw)
In-Reply-To: <CAJCQCtRCmG05mnTMtxYrnnY5T-gcjiVHP_dYNHSz7NuRrNpLTw@mail.gmail.com>



> On 5 Sep 2019, at 1:55 AM, Chris Murphy <lists@colorremedies.com> wrote:
> 
> On Wed, Sep 4, 2019 at 12:16 AM Swâmi Petaramesh <swami@petaramesh.org> wrote:
>> 
>> Hi list,
>> 
>> Is there an advised way to completely “clone” a complete BTRFS
>> filesystem, I mean to get an exact copy of a BTRFS filesystem including
>> subvolumes (even readonly snapshots) and complete file attributes
>> including extended attributes, ACLs and so, to another storage pool,
>> possibly defined with a different RAID geometry or compression ?
> 

 Remote replication is a planned feature, when ready, it can be
 used with a local target to meet this requisite.

> The bottom line answer is no. There are only compromises.
> 
> Btrfs seed sprout will do what you want, except you can't change
> geometry or compression. Last time I tested multiple devices as either
> a source or destination, I ran into problems - but it's possible some
> of this has been fixed, which is a question for Anand Jain.

 Thanks for the report. I just tested the below test case[1],
 it does not fail. Any idea?

[1]
 Create and mount a two devices seed fs, and create a sprout.

 umount /btrfs; mkfs.btrfs -fq -dsingle -msingle /dev/sdb /dev/sdc && mount /dev/sdb /btrfs && fillfs /btrfs 100 && umount /btrfs && btrfstune -S1 /dev/sdb && mount /dev/sdb /btrfs && btrfs dev add /dev/sdd /btrfs && umount /btrfs

 Mount the sprout device and delete the seed devices to make
 it an independent but identical fs.

 mount /dev/sdd /btrfs && btrfs dev del /dev/sdb /btrfs && btrfs dev del /dev/sdc /btrfs

Thanks, Anand






  parent reply	other threads:[~2019-09-05 13:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04  6:15 Cloning / getting a full backup of a BTRFS filesystem Swâmi Petaramesh
2019-09-04  9:03 ` Andrei Borzenkov
2019-09-04 14:04   ` Piotr Szymaniak
2019-09-04 20:20     ` Hugo Mills
2019-09-04 20:48       ` Chris Murphy
2019-09-04 21:04         ` Swâmi Petaramesh
2019-09-04 22:01           ` Chris Murphy
2019-09-04 22:14           ` Alberto Bursi
2019-09-05  2:47             ` Chris Murphy
2019-09-05  4:59               ` Swâmi Petaramesh
2019-09-04 17:55 ` Chris Murphy
2019-09-04 20:51   ` Chris Murphy
2019-09-05 13:06   ` Anand Jain [this message]
2019-09-05 13:13     ` Qu Wenruo

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=F4DE0ABD-51B3-4BBC-B26D-3599A78ED1E4@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=swami@petaramesh.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 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.