Restoring custom apps
-
I have just realised that when I am trying to restore a custom app which I previously installed manually on cloudron, it will try to pull the image from docker instead of the backup. But why? If I initiate a restore process, I would assume that the app should be present in the backup and could be restored from there?
-
And following up on that - how do I move a custom app to a new server properly then?
Currently, I am trying to point the app back to the older server and hope that it still works as cloudron is still installed there, although I have moved the instance to a new server.
-
As I said, in the private registry on the same server.
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
Images are not part of the app's backup. Images are essentially source code. They are immutable after release/packaging. The assumption is that it's available always through some other means. Cloudron apps only get restored because the images are always available on docker hub.
Back to the current problem, the issue is the custom registry was not backed up? I guess you have many options:
- If you have the image locally, just push it to the registry. After that restore will work.
- Otherwise build the image again from source code and tag it with same tag and push it to the registry.
- Or take the image from the old VM and push it to new VM. This might be a bit complicated since you have to get the old VM / registry running
-
-
As I said, in the private registry on the same server.
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
tangent... but as @joseph explained, this expectation is not correct. I wonder .. did we put something in our docs to mislead? Or maybe we can put something in our docs to clarify. In Cloudron, app backup === data generated by app, nothing else. This is why the packaging format and deployment is based on readonly filesystem. Otherwise, we have to back up the whole container for each app all the time! This would be infeasible. AFAIK, no PaaS backs up source code. If they roll back it's because the image is available via their registry (and not part of backup).
-
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
tangent... but as @joseph explained, this expectation is not correct. I wonder .. did we put something in our docs to mislead? Or maybe we can put something in our docs to clarify. In Cloudron, app backup === data generated by app, nothing else. This is why the packaging format and deployment is based on readonly filesystem. Otherwise, we have to back up the whole container for each app all the time! This would be infeasible. AFAIK, no PaaS backs up source code. If they roll back it's because the image is available via their registry (and not part of backup).
@girish said in Restoring custom apps:
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
tangent... but as @joseph explained, this expectation is not correct. I wonder .. did we put something in our docs to mislead? Or maybe we can put something in our docs to clarify. In Cloudron, app backup === data generated by app, nothing else. This is why the packaging format and deployment is based on readonly filesystem. Otherwise, we have to back up the whole container for each app all the time! This would be infeasible. AFAIK, no PaaS backs up source code. If they roll back it's because the image is available via their registry (and not part of backup).
Okay, I understand that - then it was just bad luck that I used a private registry on the same server.
@joseph said in Restoring custom apps:
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
Images are not part of the app's backup. Images are essentially source code. They are immutable after release/packaging. The assumption is that it's available always through some other means. Cloudron apps only get restored because the images are always available on docker hub.
Back to the current problem, the issue is the custom registry was not backed up? I guess you have many options:
- If you have the image locally, just push it to the registry. After that restore will work.
- Otherwise build the image again from source code and tag it with same tag and push it to the registry.
- Or take the image from the old VM and push it to new VM. This might be a bit complicated since you have to get the old VM / registry running
I would assume that if I use the tag the app is looking for, it should work? I can't use another tag, because then I would need to re-install the app and at least put the database dump back.
So, I will try that first, using the same tag as the app which errors out now is looking for and I hope this will re-install the app including the data I previously had from the database. Right?
-
@girish said in Restoring custom apps:
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
tangent... but as @joseph explained, this expectation is not correct. I wonder .. did we put something in our docs to mislead? Or maybe we can put something in our docs to clarify. In Cloudron, app backup === data generated by app, nothing else. This is why the packaging format and deployment is based on readonly filesystem. Otherwise, we have to back up the whole container for each app all the time! This would be infeasible. AFAIK, no PaaS backs up source code. If they roll back it's because the image is available via their registry (and not part of backup).
Okay, I understand that - then it was just bad luck that I used a private registry on the same server.
@joseph said in Restoring custom apps:
@ekevu123 said in Restoring custom apps:
My expectation sincerely was that a custom app would be restored similarly to all other apps by restoring from the backup source.
Images are not part of the app's backup. Images are essentially source code. They are immutable after release/packaging. The assumption is that it's available always through some other means. Cloudron apps only get restored because the images are always available on docker hub.
Back to the current problem, the issue is the custom registry was not backed up? I guess you have many options:
- If you have the image locally, just push it to the registry. After that restore will work.
- Otherwise build the image again from source code and tag it with same tag and push it to the registry.
- Or take the image from the old VM and push it to new VM. This might be a bit complicated since you have to get the old VM / registry running
I would assume that if I use the tag the app is looking for, it should work? I can't use another tag, because then I would need to re-install the app and at least put the database dump back.
So, I will try that first, using the same tag as the app which errors out now is looking for and I hope this will re-install the app including the data I previously had from the database. Right?
@ekevu123 said in Restoring custom apps:
I would assume that if I use the tag the app is looking for, it should work?
yes, correct. you can
cloudron build
. Then , you can just docker pull, docker tag <what-was-there-before>, docker push <one-which-was-tagged> . Then restore will work.another option:
cloudron build
. install the app. then you can Backups -> Import. you can download the backup config from the old app and then put it in the import ui. -
-
... one short question remaining, if I enable backups for my private docker registry, will the images be saved then? For another restoring process, then my custom apps could be restored together with the backups, which would be amazing and reduce the custom steps involved.
-
... one short question remaining, if I enable backups for my private docker registry, will the images be saved then? For another restoring process, then my custom apps could be restored together with the backups, which would be amazing and reduce the custom steps involved.
@ekevu123 yes, the registry holds the images and enabling backups for it will keep the images.
I think one issue might be though that because the order of apps is not defined/random , custom apps might fail to restore if the registry app restore after them. For this, the feature request you mentioned in another post will help.
For the moment, workaround is just to click restore on custom apps again after the registry has restored.