vinifmor / bauh

Graphical user interface for managing your Linux applications. Supports AppImage, Debian and Arch packages (including AUR), Flatpak, Snap and native Web applications
zlib License
959 stars 71 forks source link

Single Backup is terribly inefficient due to its sequence + deletes ALL backups, not only those made by bauh! #244

Open Templayer opened 2 years ago

Templayer commented 2 years ago

Describe the bug bauh first removes all backups (not only the one made by bauh, by the way! That includes those manually made by the user! And that could very well be its own issue... I'm going to add that to the title) and THEN makes a new backup. Making a new backup with Timeshift after deleting every other backup takes 10-20 minutes. But if a new backup is added and every other backup is deleted AFTERWARDS, then the whole process takes 1-2 minutes (and the result is the same - one full backup, the same amount of storage space is used, etc.). That's significant, especially if you are at work and need to head home for the day.

Maybe what I need for it to do should be a new option - adding "Single bauh-specific" option and renaming "Single" to "Single system-wide". Some people might want the original behaviour.

This renders the single backup feature useless for me. :(

I will have to switch to the incremental ones and delete the old ones manually. Looks like Timeshift has a feature that turns incremental ones into full ones if the previous ones are deleted - and does so quickly (probably just adds the original file index from the full backup that is being deleted to the incremental one and voila).

For now, I need to go shopping for groceries, but instead, I'm stuck watching this: image

Software Environment Using Timeshift on Linux Mint 20.3

vinifmor commented 2 years ago

Hi @Templayer , you are right. It should only delete backups created by it self. I believe this behavior can be accomplished by tagging bauh's snapshots.

In relation to the remove sequence: in the past I had problems with Rsync when removing snapshots previously created after creating a new one (I believe it held references to the previous snapshots). I would need to retest this behavior.

Just for curiosity: for BTRFS, it takes less than 5 seconds on my end to remove every previously created snapshot and generates a new one.

Thanks for reporting

Templayer commented 2 years ago

Hi @Templayer , you are right. It should only delete backups created by it self. I believe this behavior can be accomplished by tagging bauh's snapshots.

In relation to the remove sequence: in the past I had problems with Rsync when removing snapshots previously created after creating a new one (I believe it held references to the previous snapshots). I would need to retest this behavior.

Just for curiosity: for BTRFS, it takes less than 5 seconds on my end to remove every previously created snapshot and generates a new one.

Thanks for reporting

"BTRFS" - Yeah, I'm using ext4, with about 100 GBs of applications installed under Linux (can't really tell how much - it's much easier to separate applications from the system in Windows!). I just like having any tool I might need on hand. Still using MS Office 2007 though (under Wine).

I'm pretty sure Linux isn't quite made with people like me in mind. Of course, many updates mean many changes, thus it takes a lot more time.

"in the past, I had problems with Rsync when removing snapshots..." - maybe Timeshift is fixing it? I don't know, haven't looked under the hood, so to speak. On the other side - I haven't tried RESTORING the snapshots that had their ancestors deleted. Because the system has yet to fu.ck up on me.

Also one important note I forgot to even think about in this issue - in my case, I update on a daily basis and the backup is massive (100+ GB I think). It's on an SSD, as Timeshift won't work if it isn't on the same partition as the system or user folder or whatever. I mean that is one way to kill an SSD!

vinifmor commented 2 years ago

In the staging branch bauh is already only removing the self generated snapshots. The delete order still needs more testing before changing the behavior.