Backup solution for Home user of Fedora

I have a sinking feeling I’m going to borking my Fedora installs in trying to get Nvidia to work.

I’ve started setting up my Fedora install to my liking though.

Is there a way to run application installs/settings/gnome add ons etc and restoring that way?

Or is the only solution to that something like Clonezilla or Rescuezilla which a snapshot of your drive?

I have had bad experiences with clonezilla and rescuzilla as they do not handle btrfs properly. If your filesystem is btrfs, don’t do it.

This worked perfectly for me using btrfs:

CLONING FEDORA BTRFS TO WD PASSPORT USING DD
=============================================

BACKGROUND
----------
Rescuezilla/Clonezilla use partclone.btrfs which is known to corrupt BTRFS
filesystems during cloning, especially Fedora's subvolume layout.
Use dd instead for reliable BTRFS cloning.

STEP 1 - Boot from Rescuezilla USB
-----------------------------------
Boot the Fedora machine from Rescuezilla USB key or other bootable linux distro.
Do NOT boot from the Fedora NVMe - it must be completely idle during cloning.
Open a terminal.

STEP 2 - Identify drives
-------------------------
lsblk

Confirm:
  nvme0n1     = source Fedora NVMe (953.9G)
  nvme0n1p1   = EFI partition (600MB, fat32)
  nvme0n1p2   = boot partition (2GB, ext4)
  nvme0n1p3   = main BTRFS partition (951.3GB)

  sdb         = destination WD Passport (1.8TB)
  sdb1/2/3    = will be overwritten by dd

STEP 3 - Verify partition sizes match exactly
----------------------------------------------
lsblk -b /dev/nvme0n1p3 /dev/sdb3

Both must show identical byte counts before proceeding.

STEP 4 - Clone BTRFS partition with dd
----------------------------------------
dd if=/dev/nvme0n1p3 of=/dev/sdb3 bs=4M status=progress

This takes approximately 2-3 hours at ~106-170 MB/s.
Do not interrupt. Wait for the shell prompt to return.

A successful completion looks like:
1021431513088 bytes (1.0 TB, 951 GiB) copied, 9656.87 s, 106 MB/s
243528+1 records in
243528+1 records out
1021431513088 bytes (1.0 TB, 951 GiB) copied, 9656.87 s, 106 MB/s

Records in and records out must match.

STEP 5 - Verify the clone
--------------------------
Mount and check all three partitions:

mkdir /mnt/efi
mount /dev/sdb1 /mnt/efi
ls /mnt/efi
# Should show: EFI  mach_kernel  System

mkdir /mnt/boot
mount /dev/sdb2 /mnt/boot
ls /mnt/boot
# Should show kernel files, grub2, initramfs, vmlinuz etc.

mkdir /mnt/btrfs
mount /dev/sdb3 /mnt/btrfs
ls /mnt/btrfs
# Should show: home  root

STEP 6 - Verify BTRFS subvolumes
----------------------------------
btrfs subvolume list /mnt/btrfs
# Should show home, root, and root/.snapshots entries

STEP 7 - Unmount and shut down
--------------------------------
cd /
umount /mnt/btrfs
umount /mnt/boot
umount /mnt/efi

Safe to shut down and boot back into Fedora.

NOTES
------
- EFI and boot partitions can still be cloned with Rescuezilla if needed
- Only the BTRFS partition requires dd
- To restore, reverse the dd command:
  dd if=/dev/sdb3 of=/dev/nvme0n1p3 bs=4M status=progress
- Redo this backup periodically to keep it current
- Consider btrfs send/receive or Snapper for ongoing incremental backups

I gave up on cloning entire drives for backup/recovery purposes long time ago.

I back up my home folder (including config files) incrementally with Deja-Dup, and sync my data between devices with syncthing. For the few configurations outside my home folder I’m keeping notes. So I don’t mind reinstalling Fedora and all my apps, then restoring my home folder, should something go wrong. There are chances such a process takes even less time than restoring a full disk image.

Personally I like to do Timeshift (dnf install timeshift) snapshot before doing something that could possibly break things. You can select paths which you want to snapshot and which not, so it does not take up much disk space.

Thanks. Can I ask have you recovered timeshift from a GPU fail?

The previous 2 times in the last few days I’ve borked my Fedora install I get a black screen at boot up. So how would timeshift revert these settings back?

You might be better off fixing the black screen problem, there are many many reports of that recently, do a search for ‘black screen’ and linit to the last months and I’m sure you’ll find the solution.

If you would do Timeshift snapshot you would be able to revert to that snapshot before something broke (basically reverting Fedora to state before doing anything after snapshot time). If you have something broken already then installing Timeshift would not help you now.