Skip to main content
added 468 characters in body
Source Link
Tom Hale
  • 33.3k
  • 42
  • 163
  • 257
  1. Use the venerable dd for an exact duplicate
  2. btrfstune -u <newdev> will create a new UUID for the clone.

Option 1 - Data copy then change UUID

You are guaranteed to get corruption if you mountEnsure that source partition is unmounted and will not be automounted.

Use either filesystem rwdd until step 2 finishes :(slow, dumb) or partclone.btrfs -b -s /dev/src -o /dev/target

Use btrfstune -u to change UUID after copy and before mounting.

Data loss warning: Do NOT try to (auto)mount either original or copy until the UUID has changed


Option 2 - btrfs-clone

I have not personally tried btrfs-clone, but it purports to clone an existing BTRFS file system to a new one, cloning each subvolume in order.

  1. Use the venerable dd for an exact duplicate
  2. btrfstune -u <newdev> will create a new UUID for the clone.

You are guaranteed to get corruption if you mount either filesystem rw until step 2 finishes :)

Option 1 - Data copy then change UUID

Ensure that source partition is unmounted and will not be automounted.

Use either dd (slow, dumb) or partclone.btrfs -b -s /dev/src -o /dev/target

Use btrfstune -u to change UUID after copy and before mounting.

Data loss warning: Do NOT try to (auto)mount either original or copy until the UUID has changed


Option 2 - btrfs-clone

I have not personally tried btrfs-clone, but it purports to clone an existing BTRFS file system to a new one, cloning each subvolume in order.

Source Link
Tom Hale
  • 33.3k
  • 42
  • 163
  • 257

  1. Use the venerable dd for an exact duplicate
  2. btrfstune -u <newdev> will create a new UUID for the clone.

You are guaranteed to get corruption if you mount either filesystem rw until step 2 finishes :)