meta data for this page
This is an old revision of the document!
send / receive
migrate to new storage
Use Clonezilla live USB with latest 6.11 kernel.
There is a hole between Windows partitions and Windows recovery partitions:
parted /dev/nvme0n1 print free Number Start End Size File system Name Flags 17.4kB 1049kB 1031kB Free Space 1 1049kB 106MB 105MB fat32 EFI system partition boot, esp, no_automount 2 106MB 123MB 16.8MB Microsoft reserved partition msftres, no_automount 3 123MB 60.3GB 60.2GB ntfs Basic data partition msftdata 60.3GB 511GB 451GB Free Space 4 511GB 512GB 944MB ntfs Basic data partition hidden, diag, no_automount 512GB 512GB 335kB Free Space
So create 16GB swap at end and BTRFS for root part.
parted /dev/nvme0n1 mkpart swap sw 495G 511G mkpart root btrfs 60.3GB 495GB
mkfs.btrfs /dev/nvme0n1p6 mkdir /target mount /dev/nvme0n1p6 /target
sudo apt install netcat-openbsd pv zstd
rsync
Rsync send is not related to BTRFS, but here it can help if FS is ro
state due to errors.
Recreate destination volumes
cd /target btrfs sub create @rootfs btrfs sub create @rootfs/home btrfs sub create @rootfs/var btrfs sub create @rootfs/var/log btrfs sub create @rootfs/var/cache btrfs sub create @rootfs/var/spool btrfs sub create @rootfs/var/lib btrfs sub create @rootfs/var/lib/docker btrfs sub create @rootfs/var/snap btrfs sub create @rootfs/opt btrfs sub create @rootfs/usr btrfs sub create @rootfs/usr/local btrfs sub create @rootfs/home/user btrfs sub create @rootfs/home/user/prj btrfs sub create @rootfs/home/user/Documents
Rsync option explanation:
- Unordered List Item
rsync -avxHAXP –numeric-ids /target/@rootfs/ rsync -aqxP
rsync -arAXHvW rsync -arAXHvW –filter='-x btrfs.compression' /oldroot/ /rpool/ $ rsync -vuar host1:/var/www host2:/var/www
Sender:
btrfs send /target/@rootfs | zstd --fast -T0 | pv | nc -w 2 -N 192.168.177.171 44444
Receiver:
nc -vl 44444 | zstd -d | pv | btrfs receive /target
btrfs send
It can send only ro
volumes. If FS is broken and forced ro
you cannot set volumes to ro
:)
Only possible to send ro
snapshots.
Sender:
btrfs property set -ts /target/@roots ro true btrfs send /target/@rootfs | zstd --fast -T0 | pv | nc -w 2 -N 192.168.177.171 44444
Receiver:
nc -vl 44444 | zstd -d | pv | btrfs receive /target