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. Discuss
  3. Cloudron migration to new server: amazing!!!

Cloudron migration to new server: amazing!!!

Scheduled Pinned Locked Moved Discuss
migration
31 Posts 16 Posters 4.6k Views 14 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.
    • R Offline
      R Offline
      RedzzDragon
      wrote on last edited by
      #21

      You migrated without downtime! You mean there was no need to change server IPs until the migration was complete?

      I'm stacking here

      BrutalBirdieB 1 Reply Last reply
      1
      • R RedzzDragon

        You migrated without downtime! You mean there was no need to change server IPs until the migration was complete?

        I'm stacking here

        BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote on last edited by BrutalBirdie
        #22

        f87e87fb-662a-4ee1-8424-f6dccccb5e5c-image.png

        ca3601dc-0631-45c1-939e-0b84cbc4f058-image.png
        To add a new message to a long-dormant conversation.
        Synonym: necropost

        @RedzzDragon yes you can do that. BUT! Big 🦆ing but, this only works flawlessly when your migration does not require data synchronization.

        Data . . . What? Can you explain please?

        When the Old-Server A has DNS records and is serving a Webpage, New Server B starts, changes DNS records.
        Then, what can happen?
        DNS Cache and DNS delegation timing issue.
        People may get the Old Server A served because the DNS cache still has the old IP.
        This way you may end up with lost data. And when you then think, oh I can just migrate the old server AGAIN to the new one.
        Welllll others users did new inputs on the new server? So what now?

        If you only serve static content which is managed by you alone, easy-peasy.
        Dynamic content with user input. eehhhhh ☠

        Like my work? Consider donating a drink. Cheers!

        jdaviescoatesJ 1 Reply Last reply
        3
        • BrutalBirdieB BrutalBirdie

          f87e87fb-662a-4ee1-8424-f6dccccb5e5c-image.png

          ca3601dc-0631-45c1-939e-0b84cbc4f058-image.png
          To add a new message to a long-dormant conversation.
          Synonym: necropost

          @RedzzDragon yes you can do that. BUT! Big 🦆ing but, this only works flawlessly when your migration does not require data synchronization.

          Data . . . What? Can you explain please?

          When the Old-Server A has DNS records and is serving a Webpage, New Server B starts, changes DNS records.
          Then, what can happen?
          DNS Cache and DNS delegation timing issue.
          People may get the Old Server A served because the DNS cache still has the old IP.
          This way you may end up with lost data. And when you then think, oh I can just migrate the old server AGAIN to the new one.
          Welllll others users did new inputs on the new server? So what now?

          If you only serve static content which is managed by you alone, easy-peasy.
          Dynamic content with user input. eehhhhh ☠

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by jdaviescoates
          #23

          @BrutalBirdie what I've done in the past is this:

          1. take full back-up of Old-Server A
          2. dry-run import into New Server B
          3. Edit my /etc/hosts file so that even though I've not updated DNS yet my laptop thinks everything is at New Server B and test if everything is working.
          4. Presuming everything is working (and so far, it always have been as best as I could notice), update/ sync the DNS to New Server B and
          5. Power down Old-Server A

          I guess some people might be directed to Old-Server A while DNS changes propagate - but they wont be able to actually do anything/ enter any data as that server isn't running.

          So kinda sorta no downtime plus no worries about data synchronization 🤷

          The reality is that in my particular instance I don't have many users so it's the data issue and the possibility some people won't be able to do anything until their DNS updates isn't a huge deal 🙂

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          3
          • humptydumptyH Offline
            humptydumptyH Offline
            humptydumpty
            wrote on last edited by humptydumpty
            #24

            I haven't done this, so bear with me. What if we had nginx redirect traffic on Old-Server A after confirming New Server B is set up properly via the dry run method?

            In addition, we can lower the TTL days before the migration for the old server too so that when we update the DNS, it'll propagate faster.

            jdaviescoatesJ 1 Reply Last reply
            3
            • humptydumptyH humptydumpty

              I haven't done this, so bear with me. What if we had nginx redirect traffic on Old-Server A after confirming New Server B is set up properly via the dry run method?

              In addition, we can lower the TTL days before the migration for the old server too so that when we update the DNS, it'll propagate faster.

              jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote on last edited by
              #25

              @humptydumpty said in Cloudron migration to new server: amazing!!!:

              I haven't done this, so bear with me. What if we had nginx redirect traffic on Old-Server A after confirming New Server B is set up properly via the dry run method?

              That sounds like a good idea to me, but I wouldn't know how to do it. Guess I could search and get guidance from AI though

              @humptydumpty said in Cloudron migration to new server: amazing!!!:

              In addition, we can lower the TTL days before the migration for the old server too so that when we update the DNS, it'll propagate faster.

              Yeah, whenever manually adding DNS stuff I always try to remember to have TTL as low as possible. I've never really understood why anyone would ever want high TTL (and now I'm wondering what Cloudron sets it as by default when setting up DNS records?)

              I use Cloudron with Gandi & Hetzner

              humptydumptyH 1 Reply Last reply
              1
              • jdaviescoatesJ jdaviescoates

                @humptydumpty said in Cloudron migration to new server: amazing!!!:

                I haven't done this, so bear with me. What if we had nginx redirect traffic on Old-Server A after confirming New Server B is set up properly via the dry run method?

                That sounds like a good idea to me, but I wouldn't know how to do it. Guess I could search and get guidance from AI though

                @humptydumpty said in Cloudron migration to new server: amazing!!!:

                In addition, we can lower the TTL days before the migration for the old server too so that when we update the DNS, it'll propagate faster.

                Yeah, whenever manually adding DNS stuff I always try to remember to have TTL as low as possible. I've never really understood why anyone would ever want high TTL (and now I'm wondering what Cloudron sets it as by default when setting up DNS records?)

                humptydumptyH Offline
                humptydumptyH Offline
                humptydumpty
                wrote on last edited by
                #26

                @jdaviescoates said in Cloudron migration to new server: amazing!!!:

                I've never really understood why anyone would ever want high TTL

                For caching which lowers your latency and speeds up your site. It's non-noticeable in most cases, but I've been down that rabbit hole trying to optimize my WP sites 😂 Never again!

                1 Reply Last reply
                1
                • C Offline
                  C Offline
                  crazybrad
                  wrote on last edited by
                  #27

                  @jdaviescoates If you pay for DNS queries, increasing TTL reduces your cost (or keeps you below the threshold where additional payment required). But setting a TTL of 3600 (1hour) when you are not planning on making changes vs. 300 (5 min) when you are going to make changes is sensible. But I've seen some ridiculous 86400 (1 day) values too.

                  jdaviescoatesJ 1 Reply Last reply
                  1
                  • d19dotcaD Offline
                    d19dotcaD Offline
                    d19dotca
                    wrote on last edited by
                    #28

                    Funny enough for seeing this post recently… I’ll be migrating Cloudron to a new dedicated server from another next week as my rental agreement is up soon so it’s time to “upgrade” servers again.

                    I’ve usually had a pretty solid workflow for the Cloudron migrations, I did a lot of them over the years up until a bit ago, so I’ll be sure to document my experience and return here with any suggestions or tips. Hopefully they can help anyone else who has to do this exercise with an actively used Cloudron server that must keep downtime to an absolute minimum (if not near-zero).

                    --
                    Dustin Dauncey
                    www.d19.ca

                    1 Reply Last reply
                    1
                    • C crazybrad

                      @jdaviescoates If you pay for DNS queries, increasing TTL reduces your cost (or keeps you below the threshold where additional payment required). But setting a TTL of 3600 (1hour) when you are not planning on making changes vs. 300 (5 min) when you are going to make changes is sensible. But I've seen some ridiculous 86400 (1 day) values too.

                      jdaviescoatesJ Offline
                      jdaviescoatesJ Offline
                      jdaviescoates
                      wrote on last edited by
                      #29

                      @crazybrad said in Cloudron migration to new server: amazing!!!:

                      pay for DNS queries

                      I didn't even realise that was a thing. Who charges for such things?

                      I use Cloudron with Gandi & Hetzner

                      d19dotcaD 1 Reply Last reply
                      0
                      • jdaviescoatesJ jdaviescoates

                        @crazybrad said in Cloudron migration to new server: amazing!!!:

                        pay for DNS queries

                        I didn't even realise that was a thing. Who charges for such things?

                        d19dotcaD Offline
                        d19dotcaD Offline
                        d19dotca
                        wrote on last edited by d19dotca
                        #30

                        @jdaviescoates said in Cloudron migration to new server: amazing!!!:

                        @crazybrad said in Cloudron migration to new server: amazing!!!:

                        pay for DNS queries

                        I didn't even realise that was a thing. Who charges for such things?

                        Amazon AWS is one that charges. They charge per-million queries usually. It’s usually really cheap to be fair (like 60 cents per million) but can add up for businesses who generate a ton of queries. Also those typically don’t start until after a free layer of a billion queries or something like that. Haha.

                        https://aws.amazon.com/route53/pricing/

                        --
                        Dustin Dauncey
                        www.d19.ca

                        1 Reply Last reply
                        2
                        • C Offline
                          C Offline
                          crazybrad
                          wrote on last edited by
                          #31

                          @jdaviescoates We use a service called DNSMadeEasy. They've been acquired by DigiCert. They have a lot of nice features and reasonable prices that allow you grow in small increments. In our "package" a certain number of DNS queries are included. If we exceed the limit, we can buy more queries. Our practice was to use the lowest TTL possible, often using a value of 180. But as customer web traffic grew, we got closer to our limit. To prevent an overage, we increased TTL strategically which reduced queries. Hope this answers your questions.

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