Suwayomi / Suwayomi-Server

A rewrite of Tachiyomi for the Desktop
Mozilla Public License 2.0
4.02k stars 205 forks source link

Cleanup only created auto backup files #984

Closed schroda closed 3 months ago

schroda commented 3 months ago

The automated backup cleanup just deleted every file (recursively in subfolders as well) in the set folder in case it was older than the set backup ttl. This made it impossible to save the automated backups into a folder with different files.

Syer10 commented 3 months ago

I think would would be better to filter for .tachibk files instead of storing a list of old backups

schroda commented 3 months ago

what if there are non automated or mihon backups in the same folder that are not supposed to be cleaned up? wouldn't this then basically be the same issue again as the person from discord had with unintended files getting deleted?

Syer10 commented 3 months ago

In Mihon there is one main backup folder, and a subfolder for auto backups. Maybe we can do that instead Like

> backups
    -> auto
Syer10 commented 3 months ago

We can alternatively change it so we add auto to the filename and do something like filename.startsWith("org.suwayomi.tachidesk.auto") filter as well, to specify only Suwayomi backups

schroda commented 3 months ago

We can alternatively change it so we add auto to the filename and do something like filename.startsWith("org.suwayomi.tachidesk.auto") filter as well, to specify only Suwayomi backups

done