By way of explanation for the discussion:
For quite a while (years) I have been leaving my desktop PC on 24/7. Recently, I've changed my mind on that and have been shutting it down when I know I'm not going to be using it soon - like within a couple hours. This change is mostly due to the fact that with SSDs, grub timing, sddm, and KDEneon/Kubuntu I can be power-on-to-desktop in like 12 seconds.
For the last six months or so I have been doing automated snapshots and backups of my desktop install and home. The system takes a daily snapshot and makes 2 full backups to 2 separate drives once a week for both / and /home. It keeps the latest backup plus the most previous, and keeps three daily snapshots. This was adequate in my view and has in fact "saved" me twice.
However, now that I am not running the PC all-day-every-day, the automation has failed (two scripts running via cron). It has failed because:
I want to transition to a different plan so I'm looking for suggestions. I want it to be completely hands-off.
My current thoughts are to re-write the scripts to use the count of backups/snapshots instead of dates, keep 7 snapshots instead of just 3 (drive space will support this), and then send every 7th snapshot as a backup. This will result in a "weekly" backup based on seven days of use rather than seven calendar days and I'd increase my snapshot footprint. I'm not sure if 7 snapshots is necessary, but it seems easy to do and I have the space.
I thought I would create a snapshot at boot time - but only if one had not already been done that day.
The backup procedure would be harder. I could launch it right away when I boot up, but if I needed to reboot or wanted to leave I'd have to leave it running or manually re-do the backup after reboot - both of which would not be optimal. I could detect the existence of a backup, but interrupted backups would consume space while also being totally useless so again - not optimal. Note that backups using btrfs occur totally in the background so running the backup would not hamper my normal use. Previously, I ran backups at 3 am on Sunday knowing I would not be using the machine and thus would not accidentally interrupt the procedure - it does take quite some time to finish all 4 backups.
Anyone have any suggestions or better ideas on how to accomplish this?
For quite a while (years) I have been leaving my desktop PC on 24/7. Recently, I've changed my mind on that and have been shutting it down when I know I'm not going to be using it soon - like within a couple hours. This change is mostly due to the fact that with SSDs, grub timing, sddm, and KDEneon/Kubuntu I can be power-on-to-desktop in like 12 seconds.
For the last six months or so I have been doing automated snapshots and backups of my desktop install and home. The system takes a daily snapshot and makes 2 full backups to 2 separate drives once a week for both / and /home. It keeps the latest backup plus the most previous, and keeps three daily snapshots. This was adequate in my view and has in fact "saved" me twice.
However, now that I am not running the PC all-day-every-day, the automation has failed (two scripts running via cron). It has failed because:
1. The script uses file date to determine auto-removal and now that it's not on every day, it leaves older unwanted snapshots and backups behind.
2. The backups are done on Sundays so if the machine is not on that day, no backup is made at all.
2. The backups are done on Sundays so if the machine is not on that day, no backup is made at all.
I want to transition to a different plan so I'm looking for suggestions. I want it to be completely hands-off.
My current thoughts are to re-write the scripts to use the count of backups/snapshots instead of dates, keep 7 snapshots instead of just 3 (drive space will support this), and then send every 7th snapshot as a backup. This will result in a "weekly" backup based on seven days of use rather than seven calendar days and I'd increase my snapshot footprint. I'm not sure if 7 snapshots is necessary, but it seems easy to do and I have the space.
I thought I would create a snapshot at boot time - but only if one had not already been done that day.
The backup procedure would be harder. I could launch it right away when I boot up, but if I needed to reboot or wanted to leave I'd have to leave it running or manually re-do the backup after reboot - both of which would not be optimal. I could detect the existence of a backup, but interrupted backups would consume space while also being totally useless so again - not optimal. Note that backups using btrfs occur totally in the background so running the backup would not hamper my normal use. Previously, I ran backups at 3 am on Sunday knowing I would not be using the machine and thus would not accidentally interrupt the procedure - it does take quite some time to finish all 4 backups.
Anyone have any suggestions or better ideas on how to accomplish this?
Comment