Best way to backup/clone system

While BTRFS snapper has worked for me in the past, it has also failed to "restore" the system twice, forcing me to re-install everything.
I want to have another form of backup. I came up with a possible solution and need some feedback. I wished to have back for both the bootloader (/boot/efi) and the root directory.

  • Had an external HDD.
  • Created a 300M partition and used dd to clone bootloader (/boot/efi).
  • Created a 458 GiB parition (same size as my root directory) and used rsync to create a backup of the system. Since my root partition is encrypted, I also encrypted my backup partition.

Is this setup sufficient?

System:

Kernel: 5.19.13-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=1d17e6de-9557-4600-a71d-2fc817db7784 rw [email protected]
quiet
cryptdevice=UUID=ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d:luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d
root=/dev/mapper/luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d quiet splash
rd.udev.log_priority=3 vt.global_cursor_default=0
resume=/dev/mapper/luks-253338ee-7144-43f5-bc83-a762863e12f3 loglevel=3
mitigations=off
Desktop: KDE Plasma v: 5.25.5 tk: Qt v: 5.15.6 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: ASUSTeK product: ROG Strix G713QM_G713QM v: 1.0
serial: <superuser required>
Mobo: ASUSTeK model: G713QM v: 1.0 serial: <superuser required>
UEFI: American Megatrends LLC. v: G713QM.320 date: 06/30/2022
Battery:
ID-1: BAT0 charge: 52.8 Wh (61.0%) condition: 86.5/90.0 Wh (96.1%)
volts: 15.8 min: 15.9 model: AS3GWAF3KC GA50358 type: Li-ion
serial: <filter> status: not charging
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 2S
serial: <filter> charge: 100% (should be ignored) rechargeable: yes
status: discharging
CPU:
Info: model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP
arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22 process: TSMC n7
(7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
microcode: 0xA50000B
Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
L3: 16 MiB desc: 1x16 MiB
Speed (MHz): avg: 2869 high: 4246 min/max: 1200/4462 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 2013 2: 2152
3: 3104 4: 3200 5: 2897 6: 3200 7: 3200 8: 2350 9: 2139 10: 2112 11: 2511
12: 4246 13: 2996 14: 3200 15: 3398 16: 3200 bogomips: 102213
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data status: Not affected
Type: retbleed status: Not affected
Type: spec_store_bypass status: Vulnerable
Type: spectre_v1 status: Vulnerable: __user pointer sanitization and
usercopy barriers only; no swapgs barriers
Type: spectre_v2 status: Vulnerable, IBPB: disabled, STIBP: disabled,
PBRSB-eIBRS: Not affected
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: ASUSTeK
driver: nvidia v: 515.76 alternate: nouveau,nvidia_drm non-free: 515.xx+
status: current (as of 2022-10) arch: Ampere code: GAxxx process: TSMC n7
(7nm) built: 2020-22 pcie: gen: 2 speed: 5 GT/s lanes: 8 link-max: gen: 4
speed: 16 GT/s lanes: 16 ports: active: none off: DP-1 empty: none
bus-ID: 01:00.0 chip-ID: 10de:2520 class-ID: 0300
Device-2: AMD Cezanne vendor: ASUSTeK driver: amdgpu v: kernel
arch: GCN-5.1 code: Vega-2 process: TSMC n7 (7nm) built: 2018-21 pcie:
gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s ports:
active: none off: eDP-1 empty: HDMI-A-1 bus-ID: 05:00.0
chip-ID: 1002:1638 class-ID: 0300 temp: 61.0 C
Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3
compositor: kwin_x11 driver: X: loaded: amdgpu,nvidia
unloaded: modesetting,nouveau alternate: fbdev,nv,vesa dri: radeonsi
gpu: amdgpu,nvidia,nvidia-nvswitch display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1200 s-dpi: 93 s-size: 524x321mm (20.63x12.64")
s-diag: 615mm (24.19")
Monitor-1: DP-1 mapped: DP-0 note: disabled pos: primary
model: Acer B246WL serial: <filter> built: 2020 res: 1920x1200 hz: 60
dpi: 94 gamma: 1.2 size: 518x324mm (20.39x12.76") diag: 611mm (24.1")
ratio: 16:10 modes: max: 1920x1200 min: 640x480
Monitor-2: eDP-1 mapped: eDP-1-0 note: disabled model: AU Optronics
0x8294 built: 2020 res: 1920x1200 dpi: 128 gamma: 1.2
size: 382x215mm (15.04x8.46") diag: 438mm (17.3") ratio: 16:9 modes:
max: 1920x1080 min: 640x480
OpenGL: renderer: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 v: 4.6.0
NVIDIA 515.76 direct render: Yes
Audio:
Device-1: NVIDIA GA106 High Definition Audio vendor: ASUSTeK
driver: snd_hda_intel bus-ID: 3-2.2:9 v: kernel chip-ID: 0c76:1620 pcie:
class-ID: 0300 gen: 3 speed: 8 GT/s lanes: 8 link-max: gen: 4
speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228e
class-ID: 0403
Device-2: AMD Renoir Radeon High Definition Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
link-max: gen: 4 speed: 16 GT/s bus-ID: 05:00.1 chip-ID: 1002:1637
class-ID: 0403
Device-3: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: ASUSTeK
driver: N/A alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x,
snd_pci_acp6x, snd_acp_pci, snd_sof_amd_renoir pcie: gen: 3 speed: 8 GT/s
lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 05:00.5
chip-ID: 1022:15e2 class-ID: 0480
Device-4: AMD Family 17h/19h HD Audio vendor: ASUSTeK
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
link-max: gen: 4 speed: 16 GT/s bus-ID: 05:00.6 chip-ID: 1022:15e3
class-ID: 0403
Device-5: JMTek LLC. USB PnP Audio Device type: USB
driver: hid-generic,snd-usb-audio,usbhid
Sound API: ALSA v: k5.19.13-zen1-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.59 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
speed: 5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:2723 class-ID: 0280
IF: wlp3s0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 3-4:5 chip-ID: 8087:0029 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
Local Storage: total: 5.89 TiB used: 1.92 TiB (32.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFM512GD3JX013N
size: 476.94 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 41000C20
temp: 38.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Western Digital
model: WDS480G2G0A-00JH30 size: 447.13 GiB block-size: physical: 512 B
logical: 512 B type: SSD serial: <filter> scheme: GPT
ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: Western Digital
model: WDS480G2G0A-00JH30 size: 447.14 GiB block-size: physical: 512 B
logical: 512 B type: SSD serial: <filter> scheme: GPT
ID-4: /dev/sdc maj-min: 8:32 type: USB vendor: Western Digital model: WD
My Passport 2627 size: 3.64 TiB block-size: physical: 4096 B
logical: 512 B type: N/A serial: <filter> rev: 4008 scheme: GPT
ID-5: /dev/sdd maj-min: 8:48 type: USB vendor: Lenovo model: USB Hard
Drive size: 931.51 GiB block-size: physical: 512 B logical: 512 B
type: N/A serial: <filter> rev: 3U scheme: GPT
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 430.27 GiB size: 430.27 GiB (100.00%) used: 92.71 GiB
(21.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 752 KiB
(0.2%) fs: vfat dev: /dev/sda1 maj-min: 8:1
ID-3: /home raw-size: 430.27 GiB size: 430.27 GiB (100.00%) used: 92.71
GiB (21.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d
ID-4: /var/log raw-size: 430.27 GiB size: 430.27 GiB (100.00%) used: 92.71
GiB (21.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d
ID-5: /var/tmp raw-size: 430.27 GiB size: 430.27 GiB (100.00%) used: 92.71
GiB (21.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0
mapped: luks-ccf6a087-7f6c-4357-9cb5-8bf35bb72a1d
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.05 GiB used: 376.2 MiB (2.4%)
priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 16.56 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/dm-1 maj-min: 254:1
mapped: luks-253338ee-7144-43f5-bc83-a762863e12f3
Sensors:
System Temperatures: cpu: 71.6 C mobo: N/A
Fan Speeds (RPM): cpu: 0
GPU: device: nvidia screen: :0.0 temp: 61 C device: amdgpu temp: 62.0 C
Info:
Processes: 497 Uptime: 1h 25m wakeups: 12 Memory: 15.05 GiB used: 4.71 GiB
(31.3%) Init: systemd v: 251 default: graphical tool: systemctl
Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman pkgs: 2097
libs: 546 tools: octopi,pamac,paru Shell: fish v: 3.5.1 default: Bash
v: 5.1.16 running-in: yakuake inxi: 3.3.22
Garuda (2.6.8-1):
System install date:     2022-10-03
Last full system update: 2022-10-09
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:

Only you will be able to answer that. The answer depends on your specific needs. For some people this routine would be insufficient, and for others overkill.

My personal opinion is rsync backups are great. They work well, and once you have the command figured out and set up the initial backup they are fast as well.

Having an external backup routine is a good idea in general, because in the case of disc failure the snapshots will not help you.

4 Likes

Maybe:

https://wiki.archlinux.org/title/Full_system_backup_with_tar

2 Likes

I wish to have a backup for the bootloader, in case there is another infamous grub update, or I break it by giving wrong commands. And one for the root directory (/*).
I know that using rsync for the root (/*) will work, and it is also sufficient for my use; but this is the first time I am cloning the bootloader (/boot/efi), and wish to know that using dd to clone/backup the bootloader(/boot/efi) is fine.

dd is a perfectly fine solution for backing up your EFI partition.

I would make sure the backup EFI partition is exactly the same size as the partition you are copying, to make the back-and-forth with dd as straightforward as possible.

4 Likes

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