Latest backup of stopped app must be retained
-
Recently on a Cloudron server migration I discovered that a stopped app was not migrated. It was not a big thing so I left it that way.
Now I noticed that a stopped app isn't back upped but also the existing backups are ALL deleted by the system wide backup retention settings.
IMHO a stopped app should ALWAYS keep its latest backup. Otherwise on system crash or migration you're losing (mostly) valuable data.
@staff what do you think?
-
Cloudron will always keep the latest backup regardless of retention settings. Is it possible that you have change the backup storage since the app got stopped and thus the backup is now unknown for Cloudron?
-
I tried to reproduce this.
- I installed some apps.
- I took a full backup - this is required! Without this, the stopped app below won't have backups. We don't take backups of stopped apps.
- I stopped one app.
- Took another backup and downloaded the backup.
- Restored full server from the backup
Recently on a Cloudron server migration I discovered that a stopped app was not migrated. It was not a big thing so I left it that way.
The stopped app was migrated for me. It downloaded the backup and left the app in stopped state.
Now I noticed that a stopped app isn't back upped but also the existing backups are ALL deleted by the system wide backup retention settings.
The backups were not deleted for me (since it restored fine).
It seems the core issue is that the backup disappeared (which is probably why it didn't migrate either). Were the backups of the stopped app disabled by any chance? Otherwise, if you can tell me how to reproduce, I can try this again.
-
I tried to reproduce this.
- I installed some apps.
- I took a full backup - this is required! Without this, the stopped app below won't have backups. We don't take backups of stopped apps.
- I stopped one app.
- Took another backup and downloaded the backup.
- Restored full server from the backup
Recently on a Cloudron server migration I discovered that a stopped app was not migrated. It was not a big thing so I left it that way.
The stopped app was migrated for me. It downloaded the backup and left the app in stopped state.
Now I noticed that a stopped app isn't back upped but also the existing backups are ALL deleted by the system wide backup retention settings.
The backups were not deleted for me (since it restored fine).
It seems the core issue is that the backup disappeared (which is probably why it didn't migrate either). Were the backups of the stopped app disabled by any chance? Otherwise, if you can tell me how to reproduce, I can try this again.
-
@girish Set the retention to something low and see if the stopped app is part of the backups after a cleanup.
-
@robi yes, I have checked that as well. The original report was about migration though and not cleanup related.
-
@robi But even following the logic, it makes sense. Cloudron did what it was asked if there was a short rentention of backups and one app's backup was cleaned up.. it's gone. This is not a problem of Cloudron. Now, the OP was saying that the ideal conditions were met (at least, they haven't confirmed what the stopped apps Backup settings were) - app stopped, long rentention of backups, Cloudron then migrated, and now no more stopped app nor its backup(s).
As I check my own setup, I often have some apps turned off, and they appear to be included in the Cloudron-wide backup, each time the entire Cloudron has been backed up. So somehow OP's entire Cloudron backup did not include that stopped app. Mine do.
Sorry for the rambling answer: I reread the post and OP isn't trying to find or restore that lost stopped app from the previous Cloudron. They are noting that stopped apps on the new Cloudron are not getting backed up as part of the entire Cloudron backup, and if an app had been running, then stopped, then all of its existing backups are removed at the next entire Cloudron backup. THIS is totally different from what we've been trying to address. THIS is only about backups of stopped apps on a Cloudron when an entire Cloudron backup event is triggered. Ignore "migration".
-
@girish I can't tell if you're following the logic here..
..if the cleanup removed the backup, it would not be present after migration.
@robi @girish sorry for late response but I also suspect this behavior. It looked like the backup of the stopped app was removed and thus did not migrated.
That’s why my statement was like in the subject.
I still have one of my Cloudron’s having a stopped app without a “latest” backup but it was stopped in July so I wonder if there are still loggings?
-
@imc67 yeah, the logs are probably not there anymore. One thing is if you go to the Eventlog section of the app, do you see if a backup was ever made?
I can confirm there is this quirk: If an app is stopped and backup was never created, then we don't have backups for this app. Maybe we have to inform the user about this somewhere.