TL/DR: Use btrfs and subvolumes, make a snapshot and backup every day, and in minutes you can return to your previous state and you'll never lose more than a day's effort.
Full story:
My KDEneon install was still on kernel 6.8.0 and there have been a lot of changes in the newer kernels. quite a few re. btrfs and more are coming in the next couple releases as well. I hadn't upgraded until yesterday because I was using the amdpro drivers and they aren't compatible with the kernels above 6.8. A bit of reading revealed that much of the gains from using the pro drivers have been exceeded by the open source driver with the the newer kernel so yesterday morning I removed the amdpro drivers and installed the 6.14 kernel.
However, when I rebooted the 6,14 kernel hung and I ended up having to mash the reset button. This time I selected the 6.8 kernel and it booted fine. I started looking into what went wrong. I realized I had removed the dkms pro drivers and installed the new kernel in the same session so I thought maybe initramfs needed an additional rebuild. So I did that and was then able to successfully boot into 6.14.
When I began to use the system I started with my usual launching of my preferred web browser - Vivaldi - but something was terribly wrong with it. I received an error referring to my Vivaldi account and that it couldn't log in. This meant my links, passwords, history, etc., was gone. This was more than a little concerning and annoying so I set about trying to fix it. 30-40 fruitless minutes later just left me more perturbed.
Then it dawned on my that I have set my system up to take snapshots of my three subvolumes (root, home, and user cache). at 5:30am before I am usually awake. So I restored all three snapshots and rebooted and viola! I was back in business. I then repeated my amdpro driver removal, rebooted, installed 6.14 and rebooted again. I launched Vivaldi and it was normal as it had been the day before. All I did was waste 40 minutes trying to fix something that was easily recovered in less than a minute. I have no idea what caused the problem with Vivaldi but it doesn't matter since I literally lost nothing.
The snapshots and backups:
Rather than use a third party tool like btrfsbk or snapper or timeshift. I decided long ago to customize a snapshot and backup script for my own use. This was so I have total control over what happens. The early days of snapper and the others, they were notorious for filling up your drive with snapshots and I wanted to avoid this at all cost. Over the years, I have changed how my script functions to met my changing preferences. When I built my current computer, my new motherboard has 4 nvme slots and I took advantage of that immediately by installing 4x1tb nvme drives. I also had a 2tb SSD that was not being used (it had been a work device and I retired so it was in a drawer) so I installed that too. This gave me a tremendous amount of usable storage so I was able to expand my snapshot and backup procedures to take advantage of the available space.
My script runs this as a daily routine:
Every morning a snapshot is taken of all three subvolumes on my primary nvme drive.
The snapshots are retained for "rolling" 2 weeks, meaning when I have 14 daily snapshots the oldest is deleted.
The newest snapshots of root and home (not cache) are then incrementally sent as backups to a second nvme drive.
Once a week, on the backup nvme drive a snapshot is taken of the backup subvolumes.
The weekly backup snapshots are retained for 90 days, then deleted.
The end results:
The boot nvme drive has 2 weeks worth of snapshots available - a total of 45 snapshots - one per day of each of the 3 subvolume for two weeks, plus today's.
The backup nvme drive has today's root and home backups plus 90 days of Sunday snapshots for a total of 16 snapshots - 8 per subvolume.
I exclude my user cache from backups even though it has a daily snapshot.
I also moved my steam folder to a separate drive so it is not in the backup script. I occasionally make a backup of it but I don't really play much on steam so there's little need to automate a backup for it.
Also on the boot nvme drive are two other installs - Kubuntu 24.04 and a dedicated grub install.
All of this results in the boot nvme drive having 577gb used of 932gb available - 38% free space. The backup nvme drive has 608gb used and 35% available free space.
Full story:
My KDEneon install was still on kernel 6.8.0 and there have been a lot of changes in the newer kernels. quite a few re. btrfs and more are coming in the next couple releases as well. I hadn't upgraded until yesterday because I was using the amdpro drivers and they aren't compatible with the kernels above 6.8. A bit of reading revealed that much of the gains from using the pro drivers have been exceeded by the open source driver with the the newer kernel so yesterday morning I removed the amdpro drivers and installed the 6.14 kernel.
However, when I rebooted the 6,14 kernel hung and I ended up having to mash the reset button. This time I selected the 6.8 kernel and it booted fine. I started looking into what went wrong. I realized I had removed the dkms pro drivers and installed the new kernel in the same session so I thought maybe initramfs needed an additional rebuild. So I did that and was then able to successfully boot into 6.14.
When I began to use the system I started with my usual launching of my preferred web browser - Vivaldi - but something was terribly wrong with it. I received an error referring to my Vivaldi account and that it couldn't log in. This meant my links, passwords, history, etc., was gone. This was more than a little concerning and annoying so I set about trying to fix it. 30-40 fruitless minutes later just left me more perturbed.
Then it dawned on my that I have set my system up to take snapshots of my three subvolumes (root, home, and user cache). at 5:30am before I am usually awake. So I restored all three snapshots and rebooted and viola! I was back in business. I then repeated my amdpro driver removal, rebooted, installed 6.14 and rebooted again. I launched Vivaldi and it was normal as it had been the day before. All I did was waste 40 minutes trying to fix something that was easily recovered in less than a minute. I have no idea what caused the problem with Vivaldi but it doesn't matter since I literally lost nothing.
The snapshots and backups:
Rather than use a third party tool like btrfsbk or snapper or timeshift. I decided long ago to customize a snapshot and backup script for my own use. This was so I have total control over what happens. The early days of snapper and the others, they were notorious for filling up your drive with snapshots and I wanted to avoid this at all cost. Over the years, I have changed how my script functions to met my changing preferences. When I built my current computer, my new motherboard has 4 nvme slots and I took advantage of that immediately by installing 4x1tb nvme drives. I also had a 2tb SSD that was not being used (it had been a work device and I retired so it was in a drawer) so I installed that too. This gave me a tremendous amount of usable storage so I was able to expand my snapshot and backup procedures to take advantage of the available space.
My script runs this as a daily routine:
Every morning a snapshot is taken of all three subvolumes on my primary nvme drive.
The snapshots are retained for "rolling" 2 weeks, meaning when I have 14 daily snapshots the oldest is deleted.
The newest snapshots of root and home (not cache) are then incrementally sent as backups to a second nvme drive.
Once a week, on the backup nvme drive a snapshot is taken of the backup subvolumes.
The weekly backup snapshots are retained for 90 days, then deleted.
The end results:
The boot nvme drive has 2 weeks worth of snapshots available - a total of 45 snapshots - one per day of each of the 3 subvolume for two weeks, plus today's.
The backup nvme drive has today's root and home backups plus 90 days of Sunday snapshots for a total of 16 snapshots - 8 per subvolume.
I exclude my user cache from backups even though it has a daily snapshot.
I also moved my steam folder to a separate drive so it is not in the backup script. I occasionally make a backup of it but I don't really play much on steam so there's little need to automate a backup for it.
Also on the boot nvme drive are two other installs - Kubuntu 24.04 and a dedicated grub install.
All of this results in the boot nvme drive having 577gb used of 932gb available - 38% free space. The backup nvme drive has 608gb used and 35% available free space.
Comment