Re: Cloning / getting a full backup of a BTRFS filesystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 5 Sep 2019, at 1:55 AM, Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
> 
> On Wed, Sep 4, 2019 at 12:16 AM Swâmi Petaramesh <swami@xxxxxxxxxxxxxx> 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









[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux