Hey there, folks! Currently playing around with a laptop that’s got three SSDs. Running Arch but that isn’t quite related. I have everything configured on one SSD, the other two are totally fresh. What do I need to do to setup one of those fresh SSDs for Timeshift backups? Please walk me through it from the very start- I think I understand some parts but I’m not too certain.
I can format the drives using mkfs.btrfs without any issues, but I’m confused about how I can add subvolumes and configure their root permissions properly to allow Timeshift snapshots.
EDIT: I see now that I misunderstood what Timeshift does. New question- which tool can I use to make a backup of my entire filesystem onto another drive such that it can be restored?
Build the snapshot with the below file
To restore subvolume from backup we run the process in reverse:
# read backup file and decompress the stream, redirect to temporary read-only snapshot dd if=/path-to-external-backup/subvol.zstd.back | \ pv -c | pzstd -d | pv -c | \ btrfs receive /path-to-sv/ # make a RW subvolume btrfs subvolume snapshot subvol.ro subvol # delete temporary snapshot btrfs subvolume delete /path-to-sv/subvol.ro
From here
https://superuser.com/questions/1396241/btrfs-imaging-a-volume-to-an-external-file
You might want to make this into a systemd timer to run at boot or before shutting down
https://linuxconfig.org/how-to-schedule-tasks-with-systemd-timers-in-linux