How to copy BTRFS snapshots to a different disk?

I have snapshots stored at /.snapshots and at /home/.snapshots.
For the sake of backup, I want to copy them to a different disk.
What is the recommended way to do that?

garuda-inxi
System:
  Kernel: 6.7.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=fb8e5411-1ae5-4076-a8b2-7e4927f1ae70 rw rootflags=subvol=@
    quiet loglevel=3 ibt=off
  Desktop: KDE Plasma v: 6.0.1 tk: Qt v: N/A info: frameworks v: 6.0.0
    wm: kwin_wayland vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME B365M-A v: Rev X.0x
    serial: <superuser required> part-nu: SKU uuid: <superuser required>
    UEFI: American Megatrends v: 2208 date: 07/09/2021
Battery:
  ID-1: hidpp_battery_0 charge: 56% condition: N/A volts: 3.8 min: N/A
    model: Logitech G903 LIGHTSPEED Wireless Gaming Mouse w/ HERO type: N/A
    serial: <filter> status: discharging
CPU:
  Info: model: Intel Core i7-9700 bits: 64 type: MCP arch: Coffee Lake
    gen: core 9 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xD (13) microcode: 0xFA
  Topology: cpus: 1x cores: 8 smt: <unsupported> cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 2 MiB desc: 8x256 KiB L3: 12 MiB
    desc: 1x12 MiB
  Speed (MHz): avg: 4499 high: 4505 min/max: 800/4700 scaling:
    driver: intel_pstate governor: performance cores: 1: 4499 2: 4500 3: 4500
    4: 4505 5: 4499 6: 4499 7: 4497 8: 4497 bogomips: 48000
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel CoffeeLake-S GT2 [UHD Graphics 630] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: HDMI-A-1,HDMI-A-2 empty: DP-1 bus-ID: 00:02.0
    chip-ID: 8086:3e98 class-ID: 0300
  Device-2: USB C Video Adaptor driver: N/A type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3.1.1:8 chip-ID: 25a4:9321
    class-ID: 1100 serial: <filter>
  Device-3: Microdia USB Live camera driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3.4:7
    chip-ID: 0c45:636b class-ID: 0102 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4
    compositor: kwin_wayland driver: X: loaded: modesetting
    alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: 0
  Monitor-1: HDMI-A-1 model: VG27AQ1A serial: <filter> built: 2020
    res: 2560x1440 dpi: 109 gamma: 1.2 size: 596x336mm (23.46x13.23")
    diag: 685mm (27") ratio: 16:9 modes: max: 2560x1440 min: 720x400
  Monitor-2: HDMI-A-2 model: Samsung S24B300 serial: <filter> built: 2013
    res: 1920x1080 dpi: 94 gamma: 1.2 size: 521x293mm (20.51x11.54")
    diag: 598mm (23.5") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  API: Vulkan v: 1.3.279 layers: 3 device: 0 type: integrated-gpu name: Intel
    UHD Graphics 630 (CFL GT2) driver: mesa intel v: 24.0.2-arch1.2
    device-ID: 8086:3e98 surfaces: xcb,xlib,wayland device: 1 type: cpu
    name: llvmpipe (LLVM 17.0.6 256 bits) driver: mesa llvmpipe
    v: 24.0.2-arch1.2 (LLVM 17.0.6) device-ID: 10005:0000
    surfaces: xcb,xlib,wayland
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel 200 Series PCH HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
    chip-ID: 8086:a2f0 class-ID: 0403
  Device-2: Microdia USB Live camera driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-3.4:7
    chip-ID: 0c45:636b class-ID: 0102 serial: <filter>
  API: ALSA v: k6.7.9-zen1-1-zen status: kernel-api tools: N/A
  Server-1: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 03:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 bus-ID: 2-3.1:7
    chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp0s20f0u3u1 state: down mac: <filter>
  Info: services: NetworkManager, smbd, systemd-timesyncd
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) driver: btusb
    v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-9:6
    chip-ID: 0a12:0001 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: not found
    rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 2.26 TiB used: 1007.13 GiB (43.6%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37480G
    size: 447.13 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: K1B3 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Toshiba model: HDWD120 size: 1.82 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s tech: HDD
    rpm: 7200 serial: <filter> fw-rev: ACF0 scheme: GPT
Partition:
  ID-1: / raw-size: 100.99 GiB size: 100.99 GiB (100.00%)
    used: 12.33 GiB (12.2%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 31 MiB (32.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 100.99 GiB size: 100.99 GiB (100.00%)
    used: 12.33 GiB (12.2%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-4: /var/log raw-size: 100.99 GiB size: 100.99 GiB (100.00%)
    used: 12.33 GiB (12.2%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
  ID-5: /var/tmp raw-size: 100.99 GiB size: 100.99 GiB (100.00%)
    used: 12.33 GiB (12.2%) fs: btrfs dev: /dev/sda5 maj-min: 8:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 15.49 GiB used: 1.29 GiB (8.3%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 8
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 37.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.49 GiB used: 8.23 GiB (53.1%)
  Processes: 291 Power: uptime: 1h 26m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.18 GiB services: org_kde_powerdevil,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 1302 libs: 396 tools: pamac Compilers:
    gcc: 13.2.1 Shell: garuda-inxi default: Bash v: 5.2.26 running-in: konsole
    inxi: 3.3.33
Garuda (2.6.23-1):
  System install date:     2024-03-09
  Last full system update: 2024-03-10 ↻
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       Probably (Run as root to verify)
  Failed units:            

Something like that.

sudo btrfs send /mnt/snapshots/@home_2020-03-30 | sudo btrfs receive /run/media/shmu26/TS-sdd3-btrfs

Did you search the web?
Read the man pages?
Btw, this forum is not a general technical support forum.

So, maybe you have luck and someone in this forum will teach you all these things.

3 Likes

Thank you for your response. Yes, I did Google it before posting. I think it would have been sufficient to simply state that there is no Garuda-specific way to perform this operation.

That’s right, there is no Garuda-specific way.

btrfs send | btrfs receive is a good option if your needs are fairly simple. It’s baked in to the filesystem so you don’t need to install anything to use it. It’s fast, you can use a remote target, and it has support for properly handling the metadata correctly, etc.

If your needs are more complex, btrbk is a more robust version of btrfs send | btrfs receive. Read through the feature set in the linked page and you’ll see what I mean.

You can actually use btrbk for taking snapshots as well, although Snapper provides more features and is easier to “roll back” with (btrbk snapshots need to be restored manually). If you want to use them both you need to either configure btrbk to use the Snapper snapshots instead of making its own, or just have btrbk make snapshots separately for the purpose of the backup/archival process and leave the whole Snapper routine out of it altogether.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.