digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.67k stars 122 forks source link

[question] best strategy to replace a source drive (btrfs-clone) #541

Closed zilexa closed 1 year ago

zilexa commented 1 year ago

I currently have 1 backup drive and decided I would like to have 2. So I bought a second 4TB SSD.

I now have: source: 4TB SSD backup1: 4TB SSD

The new drive, since its new, I would like to use as my new main drive ("source"). This means, i have to copy the filesystem of source to my new drive. Then "source" will be formatted and become backup2.

To copy all data from source to new drive, I believe btrfs-clone is the best option.

QUESTION: How to ensure, btrbk will continue working as if nothing changed? I am worried about FS UUIDs and parent relationships. I believe I have to use this strategy to ensure btrbk will not notice anything changed: https://github.com/mwilck/btrfs-clone#chronological-strategy

But I am unsure..

zilexa commented 1 year ago

Nevermind, I didn't know about the existance of btrfs REPLACE command. Easy, safe, fast. https://wiki.tnonline.net/w/Btrfs/Replacing_a_disk