I have a system where I would like to create a full system backup. The backup should include all system settings, drivers, user data, etc. on the system storage drive. The backup should be usable to restore the system drive for that specific PC, after exchaning the physical storage device, once the system drive crashes.
There is the situation, that I only have remote ssh access to create the backup. For restoring, I obviously have to (and can) get to the PC physically (to replace the drive, etc.). In additon, the PC doesnt have direct access to the internet. I connect via internet to a jump host and have ethernet access from there to the PC.
With physical access I would boot the PC via a ventoy bootstick, to boot to a gparted live system and use dd to clone the system partitions to some image files. But this isn't possible by remote access.
Is there any alternative? e.g.: Is it possible to use backup strategies like
tar -cvpzf /backup.tar.gz --exclude=/backup.tar.gz --one-file-system
or https://help.ubuntu.com/community/BackupYourSystem/TAR
or is this not suitable in my case? Or is this not possible or maybe not complete enough?
I could remotely move the backup from that PC to a NAS or to the jump host and download it from there (or directly generat the backup to the NAS), so it is really about how to generate a suitable backup and not about how to make sure that the backup file is preserved when the system crashes. And also I will be able to reduce the used disk space to less than 30% before creating the backup, if the current 48% is too close to > 50% (which could prevent any strategies that store the backup on the drive itself).
These are the relevant partitions:
/dev/sdf1 2048 1050623 1048576 512M EFI-System
/dev/sdf2 1050624 3705751551 3704700928 1,7T Linux-Dateisystem
/dev/sdf3 3705751552 3750748159 44996608 21,5G Microsoft Basisdaten
sdf
16,4T root disk brw-rw----
├─sdf1 vfat B687-437E /boot/efi
512M root disk brw-rw----
├─sdf2 ext4 56aaa632-d318-4ca9-8094-f803b2237e44 /media/sdf2
1,7T root disk brw-rw----
└─sdf3 vfat 30A8-C177
21,5G root disk brw-rw----
/dev/sdf2 1822227568 817873716 911719948 48% /
/dev/sdf1 523244 5360 517884 2% /boot/efi