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. How does restoring apps actually work?

How does restoring apps actually work?

Scheduled Pinned Locked Moved Solved Support
7 Posts 4 Posters 1.0k Views 4 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.
    • LonkleL Offline
      LonkleL Offline
      Lonkle
      wrote on last edited by Lonkle
      #1

      So, I mentioned this elsewhere. But I was running a test Wordpress Multisite on Cloudron (I don't run anything production on Cloudron atm) - and I changed it's domain and the whole app went berserk because there's a line in wp-config.php + 4 or 5 database entries that need to be updated when a multisite's domain gets changed.

      But it left my app in an error-ed state. And the "restore" from any of the previous backups was disabled. Luckily, you guys have the clone function, so I cloned it, and fixed it up with the new domain via the CLI and manual SQL entries (before I found out you guys undocumented-ly supported Remote SQL 🎉). Anyyywayyy, I have said all of this to ask - why did I have to make a clone and have to lose all of the original app's backups in doing so? I didn't mind, of course, but I'm curious about why I couldn't have just restored the app, even if "in the background" Cloudron" had cloned it and replaced it with the cloned subcontainer? It was just a weird thing that I had to do manually and got me curious as to why.

      1 Reply Last reply
      1
      • robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #2

        Ooh, thanks for the reminder, that's another annoyance where it's unclear how to actually restore.

        In the Backup section of an app you can restore from the listed backup(s), but if it's a remote cloudron, and you plumbed the backup location correctly, you can simply copy the backup ID, but it's HIDDEN on the left side of the backup list instead of the right side where all the actions are!

        Conscious tech

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #3

          In such a case, where manual migration steps are required or the app is just broken due to installed plugins, the app can be set into "Recovery Mode" in the "Repair" section. That way the addons and the container will be running and you can use the Filemanager and/or the web terminal to fixup the app. Once done just disable Recovery Mode again.

          Overall this is also a reason why apps run ideally everything in read-only filesystem, since that ensures people can't just hack around the apps and inevitably break them eventually, which just means a lot of support work for us and sometimes even data-loss.

          1 Reply Last reply
          1
          • LonkleL Offline
            LonkleL Offline
            Lonkle
            wrote on last edited by
            #4

            Well, I believe this was strictly a Multisite Support issue (which I plan on fixing myself for you guys given how much you’ve helped me). Because all I did was change the URL on Cloudron’s side and it happened.

            I believe recovery mode was greeted out as the app was in an Error status due to redis being very confused about the new URL. If an app is in an error state does recovery mode still work?

            And that brings me back to my original question - if that’s the way to make my situations restore work, then why disable restore? Instead, when restore is hit, enter the app into recovery mode and restore. Basically, is there a technical reason why manual steps like the ones mentioned in first comment (like cloning and replacing if the app can’t even make it to recovery mode) or this comment’s suggestion shouldn’t be automated?

            1 Reply Last reply
            0
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #5

              Well, restore is to restore an app from an older backup. This will ensure the app package version matches the one when the backup was made. It however does not restore the domain or so.
              So in your case this does not fix anything, since the backup would have the old domains in the database.
              The recovery mode essentially runs the app normally from a platform point of view (mounting storage, allocating addons,...) BUT it does not run the apps entrypoint (usually start.sh) but instead just an empty "shell" which allows to use the webterminal to fix things.

              The use-cases for both actions are different.

              1 Reply Last reply
              1
              • mehdiM Offline
                mehdiM Offline
                mehdi
                App Dev
                wrote on last edited by
                #6

                @Lonk a bit off topic, but to fix your uderlying issue of multisite when changing domain, you should tweak start.sh to always assume the domain changed / check if it changed, based on the environment variable CLOUDRON_APP_DOMAIN (cf https://docs.cloudron.io/custom-apps/guide/#environment-variables ), and do the proper migrations if necessary.

                LonkleL 1 Reply Last reply
                2
                • mehdiM mehdi

                  @Lonk a bit off topic, but to fix your uderlying issue of multisite when changing domain, you should tweak start.sh to always assume the domain changed / check if it changed, based on the environment variable CLOUDRON_APP_DOMAIN (cf https://docs.cloudron.io/custom-apps/guide/#environment-variables ), and do the proper migrations if necessary.

                  LonkleL Offline
                  LonkleL Offline
                  Lonkle
                  wrote on last edited by
                  #7

                  @mehdi That’s exactly what I’m going to do. Thanks for pointing me in the right direction. I will do a merge request post 6.0 for first-class official Multisite support; I’ve got a list of 4 things to change to support Multisite now - I’m hoping I can get them all done in 2021! ☺️

                  1 Reply Last reply
                  0
                  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