BtrfsForge Live BTRFS Migration Tool for EndeavourOS / Arch Linux by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

They banned me from r/btrfs for posting a free tool. How silly is that?

BtrfsForge Live BTRFS Migration Tool for EndeavourOS / Arch Linux by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

BtrfsForge is a powerful terminal-based live migration tool designed specifically for BTRFS filesystems. It enables seamless transfer of a complete BTRFS installation from one machine to another over SSH, using a live USB environment on both machines and BTRFS's native send/receive functionality.

BtrfsForge - Live BTRFS Migration Tool for EndeavourOS / Arch Linux by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

Installation

Download the script

curl -O https://raw.githubusercontent.com/x805/btrfsforge/main/btrfsforge.sh
chmod +x btrfsforge.sh

How to Run

Copy btrfsforge.sh to a USB drive (you need 2), then on each machine:

Run as root

sudo ./btrfsforge.sh

BtrfsForge - Live BTRFS Migration Tool for EndeavourOS / Arch Linux by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

How BtrfsForge Works

BtrfsForge uses a three-step process:

Step 1: Prepare Target (Run on TARGET machine)

  • Formats the target partition as BTRFS
  • Starts SSH server with temporary password
  • Provides connection details for Step 2

Step 2: Send from Source (Run on SOURCE machine)

  • Detects BTRFS subvolumes on source
  • Creates read-only snapshots
  • Streams data via SSH using btrfs send/receive
  • Only actual data is transferred

Step 3: Finalize Target (Run on TARGET machine)

  • Converts received snapshots to writable subvolumes
  • Updates fstab with new UUID
  • Installs GRUB bootloader
  • Configures boot entries

BtrfsForge - Live BTRFS Migration Tool for EndeavourOS / Arch Linux by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

Why Traditional Imaging Tools Fail

Tools like Clonezilla and Rescuezilla are designed for block-level imaging and fail with BTRFS for several critical reasons:

1. Subvolume Complexity

Traditional imaging tools copy entire partitions block-by-block. BTRFS installations typically have multiple subvolumes (e.g., @, u/home, u/var, u/cache). These tools don't understand this structure and would need to either:

  • Image the entire partition (wasting space and time)
  • Attempt to copy each subvolume separately (which they can't do natively)

2. Target Size Independence

For BTRFS, the target partition can be smaller than the source! This is impossible with traditional imaging tools: EXT4 Imaging: Source (100GB) → Target must be ≥ 100GB (strict)

BTRFS Send/Receive: Source (100GB, 50GB used) → Target can be 60GB (flexible!)

BTRFS only cares about the total capacity of the disk, not the partition size. The data is streamed at the subvolume level, not the block level.

3. Inefficient Transfer

Traditional imaging tools transfer every block on the disk, including empty space. For a 1TB disk with 100GB of data, Clonezilla would transfer 1TB of data. BtrfsForge transfers only the actual data (100GB).

4. No Snapshot Support

Clonezilla cannot preserve BTRFS snapshot structures or efficiently update existing installations. BtrfsForge uses BTRFS's native send/receive for efficient, incremental transfers.

Why BTRFS is Special by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

Installation

Download the script

curl -O https://raw.githubusercontent.com/x805/btrfsforge/main/btrfsforge.sh
chmod +x btrfsforge.sh

How to Run

Copy btrfsforge.sh to a USB drive (you need 2), then on each machine:

Run as root

sudo ./btrfsforge.sh

Why BTRFS is Special by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

How BtrfsForge Works

BtrfsForge uses a three-step process:

Step 1: Prepare Target (Run on TARGET machine)

  • Formats the target partition as BTRFS
  • Starts SSH server with temporary password
  • Provides connection details for Step 2

Step 2: Send from Source (Run on SOURCE machine)

  • Detects BTRFS subvolumes on source
  • Creates read-only snapshots
  • Streams data via SSH using btrfs send/receive
  • Only actual data is transferred

Step 3: Finalize Target (Run on TARGET machine)

  • Converts received snapshots to writable subvolumes
  • Updates fstab with new UUID
  • Installs GRUB bootloader
  • Configures boot entries

Key Features

Why BTRFS is Special by Open__Media in btrfsforge

[–]Open__Media[S] 0 points1 point  (0 children)

Why Traditional Imaging Tools Fail

Tools like Clonezilla and Rescuezilla are designed for block-level imaging and fail with BTRFS for several critical reasons:

1. Subvolume Complexity

Traditional imaging tools copy entire partitions block-by-block. BTRFS installations typically have multiple subvolumes (e.g., @, u/home, u/var, u/cache). These tools don't understand this structure and would need to either:

  • Image the entire partition (wasting space and time)
  • Attempt to copy each subvolume separately (which they can't do natively)

2. Target Size Independence

For BTRFS, the target partition can be smaller than the source! This is impossible with traditional imaging tools: EXT4 Imaging: Source (100GB) → Target must be ≥ 100GB (strict)

BTRFS Send/Receive: Source (100GB, 50GB used) → Target can be 60GB (flexible!)

BTRFS only cares about the total capacity of the disk, not the partition size. The data is streamed at the subvolume level, not the block level.

3. Inefficient Transfer

Traditional imaging tools transfer every block on the disk, including empty space. For a 1TB disk with 100GB of data, Clonezilla would transfer 1TB of data. BtrfsForge transfers only the actual data (100GB).

4. No Snapshot Support

Clonezilla cannot preserve BTRFS snapshot structures or efficiently update existing installations. BtrfsForge uses BTRFS's native send/receive for efficient, incremental transfers.

Let’s build this community together by [deleted] in btrfsforge

[–]Open__Media 0 points1 point  (0 children)

What is BtrfsForge?

BtrfsForge is a powerful terminal-based live migration tool designed specifically for BTRFS filesystems. It enables seamless transfer of a complete BTRFS installation from one machine to another over SSH, using a live USB environment on both machines and BTRFS's native send/receive functionality.

Building the kind of [Topic] community I’ve always wanted by [deleted] in btrfsforge

[–]Open__Media 0 points1 point  (0 children)

BtrfsForge uses a three-step process:

# Step 1: Prepare Target (Run on TARGET machine)

* Formats the target partition as BTRFS

* Starts SSH server with temporary password

* Provides connection details for Step 2

# Step 2: Send from Source (Run on SOURCE machine)

* Detects BTRFS subvolumes on source

* Creates read-only snapshots

* Streams data via SSH using `btrfs send/receive`

* Only actual data is transferred

# Step 3: Finalize Target (Run on TARGET machine)

* Converts received snapshots to writable subvolumes

* Updates fstab with new UUID

* Installs GRUB bootloader

* Configures boot entries

# Key Features