Background job to clean up old backups of the updater#9855
Conversation
* a one-time job gets scheduled after each update via a repair job * the job remove all directories inside data/updater-INSTANCEID/backups except the 3 most recent ones (determined by mtime of the folder) Signed-off-by: Morris Jobke <[email protected]>
| @@ -0,0 +1,90 @@ | |||
| <?php | |||
| /** | |||
There was a problem hiding this comment.
Didn't want to do it, because it uses a abstract class and I don't want to mess right now :/
|
Failing test is a temp hiccup |
|
I am here because there are six previous versions of nextcloud in my backups folder, and I was looking for a way to get rid of them automatically. If the one-time job is supposed to delete all directories except for the past three, and I already have six, is it reasonable to assume that the feature may not be working like it should? Also, is there any chance you might add an option so everyone could decide individually how many previous versions they would like to keep? 1.1 gigs for three unused folders may not seem like much on a huge disk, but if you host on a small VPN these things do add up (and since rollbacks aren't possible anyway, I personally don't see why I should keep more than one previous version). Thanks! |
|
It would be nice to config how many backups are keept. It makes no sense to have the 3 last backups - when a update is corrupt, i need max. the last backup. |
The backup dir on my instance looks like this summing up for nearly 8 GB 🙈):