Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Disaster recovery - Restoring a backup

Disaster recovery - Restoring a backup

Scheduled Pinned Locked Moved Solved Support
restorebackupsuninstall
8 Posts 4 Posters 1.5k Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      M Offline
      makemrproper
      wrote on last edited by girish
      #1

      Hi

      I can't understand how I as an operator shall use the backup system Cloudron offers.

      Yesterday I made a mistake and deleted an app I shouldn't have deleted (root cause).

      Question time:
      Given that I only remember the name of the container, how can I restore the backup of the container?
      I don't have the UUID, I don't have the BackupID. I have full access to the object storage, api keys, secrets and encryption key.

      My object storage is teeming with backups, Cloudron is set to do it every 6 hours. And this succeeds day in and day out. Great!

      However It is not clear to me how to restore these backups.

      In my Object storage I have backup archives like this
      83503755-281e-4154-9436-dcf3f4bbedf7-image.png

      They seem to follow the naming convention of the uuid for the contiainer, OK that makes sense.

      When I am going to restore my backups I have to provide these fields:
      1e01c154-09f8-4076-a203-60ba0367d060-image.png

      As far as I can tell, as an operator I need to keep track of what was the UUID of the container I deleted, in order to restore it. In addition I must also know what is the BackupID. More on that.

      When I upload one of my backup config files, there seems to be reference to a BackupID ?
      For one of my backups, this is the BackupID
      2020-06-13-064435-141/box_2020-06-13-065422-378_v5.2.4 <--- If I don't have the Backup Config File how can I generate this ID? Or how to I find the ID of the container I accidentally deleted?


      The only surefire way I can think of is to download the backup configuration file for every container and keep them in a folder on my onedrive for whenever disaster strikes such as now. Is this the way every one else are doing it?

      Is there a place I can get an overview and piece together the variables and be able to do a restore of the container?

      in order not to get stuck in the future, I now will need to do the following when I put an application in production (business critical):

      • Create a spreadsheet containing a list of all my containers.
      • Keep track of the UUID for each container.
      • Download the backup configuration file for each container.
      • Explicitly store the BackupID in the spreadsheet per application.
      • Maybe there are more fields I must keep track of as well (???).
      • Randomly test the restore capability of each container monthly.

      Unless there are some elegant solutions here?

      Guys this was my first brush with disaster recovery for an application I host on Cloudron and it not go down well.
      If it wasn't for my random DigitalOcean Droplet snapshot(backups) and DigitalOcean scheduled VM backups, I would have been screwed here. I was not able to find the right backup archive and the right values to enter to correctly restore backup.

      If anything this is a defect toward the documentation, because I cannot figure it out by reading this: https://cloudron.io/documentation/backups/ document. All of the great backup functionality in Cloudron didn't help me.

      In Risk Management we use the Bowtie risk causal model and focus on our Barrier Management. The backups of Cloudron was supposed to be a recovery barrier.
      4983e4ee-2cf7-49ec-8698-beb22026da5c-image.png

      This is not uncommon in IT, disaster recovery is a key think to test out. Unfortunately for me I hadn't done all the testing necessary as I didn't see myself ending up in this scenario (making a mistake and deleting a container I actually needed).

      1 Reply Last reply
      2
      • girishG Do not disturb
        girishG Do not disturb
        girish
        Staff
        wrote on last edited by
        #2

        @makemrproper said in Disaster recovery - Restoring a backup:

        As far as I can tell, as an operator I need to keep track of what was the UUID of the container I deleted, in order to restore it.

        Sorry for much confusion. Let me first try to explain how to import.

        Finding the App's ID

        Each Cloudron app has a unique ID. This is separate from the internal docker container id and you should never have to use any docker container id related stuff,

        Now the question is how to figure out this unique ID of an uninstalled app. One way is to look into the event log. Select the uninstalled apps as the filter:

        54e38dd5-5d1e-4cae-b6d7-c8d259faa5c0-image.png

        Then when you click on the event, you will see the app id:
        fd6568bb-fd53-44d7-8832-612971b9d9dd-image.png

        Locating the backup

        The backups are stored with the filename timestamp/app_<id>_v<packageversion>.tar.gz (for tgz backups) or timestamp/app_<id>_v<packageversion> (for rsync backups). The package version is needed in the case where you have a old version of an app and you want to restore to that old version.

        Install an empty app

        We have to next install the app for appstore. For this go to the appstore and install the app.
        68df18aa-cba6-42fb-a512-3caba88bc126-image.png

        Notice the package version in the URL bar. Above, I am trying to install package v2.0.5 of wordpress. This version must match the version in the backup we located above.

        Import app

        Finally, go to app -> configure -> import

        OK, all that said, what can be improved here. I see that the way to locate an uninstalled app's id is missing from the docs. I can add that part. Is there anything else we can fix on our side? Maybe we can keep the app's fqdn -> uuid listing alongside the backups?

        cbeamsC 1 Reply Last reply
        4
        • girishG girish

          @makemrproper said in Disaster recovery - Restoring a backup:

          As far as I can tell, as an operator I need to keep track of what was the UUID of the container I deleted, in order to restore it.

          Sorry for much confusion. Let me first try to explain how to import.

          Finding the App's ID

          Each Cloudron app has a unique ID. This is separate from the internal docker container id and you should never have to use any docker container id related stuff,

          Now the question is how to figure out this unique ID of an uninstalled app. One way is to look into the event log. Select the uninstalled apps as the filter:

          54e38dd5-5d1e-4cae-b6d7-c8d259faa5c0-image.png

          Then when you click on the event, you will see the app id:
          fd6568bb-fd53-44d7-8832-612971b9d9dd-image.png

          Locating the backup

          The backups are stored with the filename timestamp/app_<id>_v<packageversion>.tar.gz (for tgz backups) or timestamp/app_<id>_v<packageversion> (for rsync backups). The package version is needed in the case where you have a old version of an app and you want to restore to that old version.

          Install an empty app

          We have to next install the app for appstore. For this go to the appstore and install the app.
          68df18aa-cba6-42fb-a512-3caba88bc126-image.png

          Notice the package version in the URL bar. Above, I am trying to install package v2.0.5 of wordpress. This version must match the version in the backup we located above.

          Import app

          Finally, go to app -> configure -> import

          OK, all that said, what can be improved here. I see that the way to locate an uninstalled app's id is missing from the docs. I can add that part. Is there anything else we can fix on our side? Maybe we can keep the app's fqdn -> uuid listing alongside the backups?

          cbeamsC Offline
          cbeamsC Offline
          cbeams
          wrote on last edited by cbeams
          #3

          @girish There appears to be a bug when installing older, non-current versions by modifying the query string as mentioned above.

          This is what it looks like when I try to install an older version of Ghost (v3.139.4) when the current version is 3.40.5:

          d2cae8a7-7729-4f4c-b2a8-ea62231ce355-image.png

          Notice how the dialog tells me I'm going to be installing the current version versus the one I specified. I thought that this meant that the query string technique didn't (any longer) work, so I tried a bogus version number (v42.0.0) and got the following error message:

          f20251d6-863f-44d0-9cbe-c72b461eba80-image.png

          Then I figured it's just a display bug, and went ahead with the installation. The desired older version (v3.139.4) was indeed installed correctly, but the process was pretty confusing.

          Perhaps more importantly, I would have had no way of knowing how to install an older version of an app if I hadn't seen this forum post and the tip above about changing the query string. I would have expected there to be a drop down, or at least text field available in the installation workflow to allow me to specify a version other than the most current.

          I've since searched the docs as well, and I couldn't find anything on this feature. In any case, I'm glad it's there, and the process of testing out my remote backups against this older app version was incredibly smooth!

          nebulonN girishG 2 Replies Last reply
          1
          • cbeamsC cbeams

            @girish There appears to be a bug when installing older, non-current versions by modifying the query string as mentioned above.

            This is what it looks like when I try to install an older version of Ghost (v3.139.4) when the current version is 3.40.5:

            d2cae8a7-7729-4f4c-b2a8-ea62231ce355-image.png

            Notice how the dialog tells me I'm going to be installing the current version versus the one I specified. I thought that this meant that the query string technique didn't (any longer) work, so I tried a bogus version number (v42.0.0) and got the following error message:

            f20251d6-863f-44d0-9cbe-c72b461eba80-image.png

            Then I figured it's just a display bug, and went ahead with the installation. The desired older version (v3.139.4) was indeed installed correctly, but the process was pretty confusing.

            Perhaps more importantly, I would have had no way of knowing how to install an older version of an app if I hadn't seen this forum post and the tip above about changing the query string. I would have expected there to be a drop down, or at least text field available in the installation workflow to allow me to specify a version other than the most current.

            I've since searched the docs as well, and I couldn't find anything on this feature. In any case, I'm glad it's there, and the process of testing out my remote backups against this older app version was incredibly smooth!

            nebulonN Away
            nebulonN Away
            nebulon
            Staff
            wrote on last edited by
            #4

            @cbeams If I understand you correctly, I think the confusion comes from package version vs upstream app version. Those are basically never the same.

            1 Reply Last reply
            0
            • cbeamsC cbeams

              @girish There appears to be a bug when installing older, non-current versions by modifying the query string as mentioned above.

              This is what it looks like when I try to install an older version of Ghost (v3.139.4) when the current version is 3.40.5:

              d2cae8a7-7729-4f4c-b2a8-ea62231ce355-image.png

              Notice how the dialog tells me I'm going to be installing the current version versus the one I specified. I thought that this meant that the query string technique didn't (any longer) work, so I tried a bogus version number (v42.0.0) and got the following error message:

              f20251d6-863f-44d0-9cbe-c72b461eba80-image.png

              Then I figured it's just a display bug, and went ahead with the installation. The desired older version (v3.139.4) was indeed installed correctly, but the process was pretty confusing.

              Perhaps more importantly, I would have had no way of knowing how to install an older version of an app if I hadn't seen this forum post and the tip above about changing the query string. I would have expected there to be a drop down, or at least text field available in the installation workflow to allow me to specify a version other than the most current.

              I've since searched the docs as well, and I couldn't find anything on this feature. In any case, I'm glad it's there, and the process of testing out my remote backups against this older app version was incredibly smooth!

              girishG Do not disturb
              girishG Do not disturb
              girish
              Staff
              wrote on last edited by girish
              #5

              @cbeams Yeah, this confusion comes up now and then. There is first the app's version - this is the upstream app version. Then there is the Cloudron package version. These two are totally separate. In the example above:

              • This app packages Ghost 3.40.5. Here, 3.40.5 refers to the upstream Ghost version. This also means that should you want to move out (or into) of Cloudron, then you must be using Ghost 3.40.5.
              • The package version is 3.139.4. This is what you see in the URL bar.

              This has come up atleast a couple of other times in the past and that too with the very same app Ghost. This is because the package version and upstream version resemble each other. In fact, the last time someone complained, I randomly bumped up the package version by 100, in the hope of reducing this confusion 🙂 (This is why it is 3.139.4. If I hadn't bumped it, it would be 3.39.4...)

              If you have any suggestions on how to reduce this confusion, we are open to ideas. Also, if you go to an App's Update section, it will say more clearly the package version and upstream version. The main restriction we have is the package versions have to be semver. We rely on it heavily for the update mechanism. (so a complex debian style packaging version is quite hard to implement for us)

              cbeamsC 1 Reply Last reply
              1
              • girishG girish

                @cbeams Yeah, this confusion comes up now and then. There is first the app's version - this is the upstream app version. Then there is the Cloudron package version. These two are totally separate. In the example above:

                • This app packages Ghost 3.40.5. Here, 3.40.5 refers to the upstream Ghost version. This also means that should you want to move out (or into) of Cloudron, then you must be using Ghost 3.40.5.
                • The package version is 3.139.4. This is what you see in the URL bar.

                This has come up atleast a couple of other times in the past and that too with the very same app Ghost. This is because the package version and upstream version resemble each other. In fact, the last time someone complained, I randomly bumped up the package version by 100, in the hope of reducing this confusion 🙂 (This is why it is 3.139.4. If I hadn't bumped it, it would be 3.39.4...)

                If you have any suggestions on how to reduce this confusion, we are open to ideas. Also, if you go to an App's Update section, it will say more clearly the package version and upstream version. The main restriction we have is the package versions have to be semver. We rely on it heavily for the update mechanism. (so a complex debian style packaging version is quite hard to implement for us)

                cbeamsC Offline
                cbeamsC Offline
                cbeams
                wrote on last edited by
                #6

                @girish said in Disaster recovery - Restoring a backup:

                If you have any suggestions on how to reduce this confusion, we are open to ideas.

                Thanks for the explanation. Indeed, the visually similar version numbers did throw me off here. Perhaps one way to make things clearer would be to explicitly mention both app version and package version in the installation dialog. Then the reader can't miss the distinction.

                @cbeams wrote:

                Perhaps more importantly, I would have had no way of knowing how to install an older version of an app if I hadn't seen this forum post and the tip above about changing the query string. I would have expected there to be a drop down, or at least text field available in the installation workflow to allow me to specify a version other than the most current.

                Just re-iterating this here, as I think it's actually the more important improvement request. Shouldn't there be a more first-class way to discover and install older app/package versions? This is an important use case for anyone doing disaster recovery for an app older than the latest version.

                1 Reply Last reply
                1
                • girishG Do not disturb
                  girishG Do not disturb
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @cbeams said in Disaster recovery - Restoring a backup:

                  Just re-iterating this here, as I think it's actually the more important improvement request

                  Yes, I think that's a good idea. Some drop down where we can select the package version instead of having to rely on the URL bar. Are you able to open a request here - https://forum.cloudron.io/category/97/feature-requests ?

                  think it requires some appstore changes since we also need some API on the appstore side to query all the available package version.

                  cbeamsC 1 Reply Last reply
                  2
                  • girishG girish

                    @cbeams said in Disaster recovery - Restoring a backup:

                    Just re-iterating this here, as I think it's actually the more important improvement request

                    Yes, I think that's a good idea. Some drop down where we can select the package version instead of having to rely on the URL bar. Are you able to open a request here - https://forum.cloudron.io/category/97/feature-requests ?

                    think it requires some appstore changes since we also need some API on the appstore side to query all the available package version.

                    cbeamsC Offline
                    cbeamsC Offline
                    cbeams
                    wrote on last edited by
                    #8

                    @girish wrote:

                    Are you able to open a request [for this]?

                    Done, thanks: https://forum.cloudron.io/topic/4306/provide-ui-support-for-choosing-app-package-version-during-installation

                    1 Reply Last reply
                    2
                    • robiR robi referenced this topic on
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search