Arch Backup Image
Overview
This document covers the steps that I took in creating a backup image of the T7 which hosts the Arch Linux installation.
Backup Procedure
Backup T7 from Windows WSL2
First, ensure that the Samsung T7 is connected to the Windows host machine. from an admin PowerShell window run the following:
wsl --mount \\.\PHYSICALDRIVE3 --bareOnce mounted, open your WSL2 terminal.
lsblkwhich should look something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 388.4M 1 disk sdb 8:16 0 186M 1 disk sdc 8:32 0 8G 0 disk [SWAP] sdd 8:48 0 931.5G 0 disk ├─sdd1 8:49 0 512M 0 part ├─sdd2 8:50 0 890G 0 part └─sdd3 8:51 0 41G 0 part sde 8:64 0 1T 0 disk /snap /mnt/wslg/distro /In this example we know it will be `sdd` based on the size of the drive, the partitions which we recognise as the EFI, root and home partitions.
Now we can create the backup image using `dd`.
sudo dd if=/dev/sdd bs=64M status=progress | zstd -T0 -1 | dd of=/mnt/nas/arch_t7_backup.img.zst bs=4MReplace
/dev/sddwith the correct device identifier for your T7.Replace
/mnt/nas/arch_t7_backup.img.zstwith the desired path and filename for the backup image.The image is compressed using
zstdto save space.
Restore Procedure
Remount the Samsung T7 in WSL2 from an admin PowerShell window:
wsl --mount \\.\PHYSICALDRIVE3 --bareOnce mounted, open your WSL2 terminal.
lsblkwhich should look something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 388.4M 1 disk sdb 8:16 0 186M 1 disk sdc 8:32 0 8G 0 disk [SWAP] sdd 8:48 0 931.5G 0 disk ├─sdd1 8:49 0 512M 0 part ├─sdd2 8:50 0 890G 0 part └─sdd3 8:51 0 41G 0 part sde 8:64 0 1T 0 disk /snap /mnt/wslg/distro /Identify the correct device for your T7, in this example it is `sdd`.
To restore the backup image to the T7, use the following command:
zstd -d -c /mnt/nas/arch_t7_backup.img.zst | sudo dd of=/dev/sdX bs=64M status=progressThis uses the zstd decompression to read the backup image and pipes it to `dd` to write it back to the T7.