Set Up Fedora Partitions for Timeshift
If you’re a Fedora user and want a seamless snapshot of your filesystem, Timeshift is the tool for you. Leveraging BTRFS, Timeshift ensures easy restoration in the event of system mishaps without affecting your personal files.
Fedora is however not supported by the developper and to make this work, you need to rename your subvolumes as per Ubuntu’s naming. Here’s a succinct guide on setting things up.
Why Timeshift?
- Snapshot Capability: Periodic or on-boot filesystem snapshots.
- Space Efficiency: Minimal space use with BTRFS.
- System Protection: Restore quickly from changes or upgrades that may cause issues.
- Separate Personal Files: As the
$HOME
directory is on a distinct subvolume, rollbacks don’t affect personal files.
Setup Steps:
-
Check Your Partitions: Identify BTRFS and its mounting.
$ sudo lsblk
Look for your BTRFS partition, typically denoted by
TYPE="btrfs"
or in our case (since we use LUKS)TYPE="crypt"
.NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS zram0 252:0 0 8G 0 disk [SWAP] nvme0n1 259:0 0 476.9G 0 disk ββnvme0n1p1 259:1 0 600M 0 part /boot/efi ββnvme0n1p2 259:2 0 1G 0 part /boot ββnvme0n1p3 259:3 0 475.4G 0 part ββluks-c3316e6d-1231-32c0-97b4-0fd589f26b13 253:0 0 475.3G 0 crypt /home /
-
Mount BTRFS Pool:
$ sudo mkdir /btrfs-pool $ sudo mount -t btrfs /dev/mapper/[your-btrfs-uuid] /btrfs-pool
-
Rename Subvolumes for Timeshift Compatibility: Fedora uses a different naming convention than Ubuntu. To make Timeshift compatible:
$ sudo mv /btrfs-pool/root /btrfs-pool/@ $ sudo mv /btrfs-pool/home /btrfs-pool/@home
-
Confirm Subvolume Names:
$ sudo btrfs subvolume list /btrfs-pool
You should see paths like
@
and@home
. -
Edit fstab: Update the fstab to reflect the new subvolume names.
$ sudo nano /etc/fstab
-
Update GRUB:
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Your mounts should now be
subvol=@
andsubvol=@home
. -
Unmount and Clean Up:
$ sudo umount /btrfs-pool $ sudo rmdir /btrfs-pool
-
Reboot: It’s crucial to reboot after these changes to ensure they’ve taken effect. Make sure you keep a live-usb at hand everything’s confirmed to work.
-
Set Up Timeshift: Now that your partitions are ready, install and configure Timeshift. Initiate a manual snapshot to verify it’s working.
Final Thoughts: Harness the power of Timeshift with Fedora for a safer, more resilient system. Ensure you’ve read accompanying documentation and familiarize yourself with recovery procedures. Happy computing!
Note: The code snippets provided are based on the sample input and may require adjustments based on your actual system details. Always back up critical data before making changes.