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. Server migration tips? Need same ubuntu version? Possible to do without downtime?

Server migration tips? Need same ubuntu version? Possible to do without downtime?

Scheduled Pinned Locked Moved Discuss
migration
16 Posts 4 Posters 1.4k Views 5 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.
    • jdaviescoatesJ jdaviescoates

      OK, so I've hit my first hurdle:

      My backup is using a Filesystem (Mountpoint) because when I first purchased my Hetzner Storage Box (back before Cloudron automated mounting stuff) I just followed Hetzner instructions on how to mount the Storage Box.

      But of course my new server doesn't yet have anything mounted yet at /mnt/backup

      Not sure how best to proceed?

      I guess perhaps my only option given the circumstances would be for me to manually mount my Hetzner Storage Box to my server at /mnt/backup before proceeding?

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #6

      @jdaviescoates Can't you mount the storage box in the restore UI?

      jdaviescoatesJ 1 Reply Last reply
      0
      • girishG girish

        @jdaviescoates Can't you mount the storage box in the restore UI?

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

        @girish said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

        @jdaviescoates Can't you mount the storage box in the restore UI?

        Oh, you mean ignore the fact that it auto loads the backup configuration as Filesystem (Mountpoint) and just choose CIFS instead and enter relevant credentials?

        I guess you do, because that worked, thanks!

        Just doing a Dry run now...

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        0
        • jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #8

          OK, so my next issue is that one of my Volumes (the one with my ebooks on) was actually a Hetzner Cloud Volume mounted into my Hetzner VPS so now Calibre Web isn't working because it can't locate the files...

          So I guess I somehow need to copies the files off of the Hetzner Cloud Volume somewhere else and then add the new somewhere else as a new volume and then add it to my Calibre web...

          I use Cloudron with Gandi & Hetzner

          jdaviescoatesJ 1 Reply Last reply
          0
          • jdaviescoatesJ jdaviescoates

            OK, so my next issue is that one of my Volumes (the one with my ebooks on) was actually a Hetzner Cloud Volume mounted into my Hetzner VPS so now Calibre Web isn't working because it can't locate the files...

            So I guess I somehow need to copies the files off of the Hetzner Cloud Volume somewhere else and then add the new somewhere else as a new volume and then add it to my Calibre web...

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

            @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

            OK, so my next issue is that one of my Volumes (the one with my ebooks on) was actually a Hetzner Cloud Volume mounted into my Hetzner VPS so now Calibre Web isn't working because it can't locate the files...

            So I guess I somehow need to copies the files off of the Hetzner Cloud Volume somewhere else and then add the new somewhere else as a new volume and then add it to my Calibre web...

            Actually, in this case, now that I've got loads more disk space on my server I may as well just store all my books on it instead of having them on an external volume.

            So now trying to upload a 8GB zip file via the File Manager... not sure that's going to work...

            I use Cloudron with Gandi & Hetzner

            girishG 1 Reply Last reply
            0
            • jdaviescoatesJ jdaviescoates

              @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

              OK, so my next issue is that one of my Volumes (the one with my ebooks on) was actually a Hetzner Cloud Volume mounted into my Hetzner VPS so now Calibre Web isn't working because it can't locate the files...

              So I guess I somehow need to copies the files off of the Hetzner Cloud Volume somewhere else and then add the new somewhere else as a new volume and then add it to my Calibre web...

              Actually, in this case, now that I've got loads more disk space on my server I may as well just store all my books on it instead of having them on an external volume.

              So now trying to upload a 8GB zip file via the File Manager... not sure that's going to work...

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #10

              @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

              So now trying to upload a 8GB zip file via the File Manager... not sure that's going to work...

              Can confirm, we have never tested such big sizes 🙂 Let us know how it goes...

              jdaviescoatesJ 1 Reply Last reply
              0
              • girishG girish

                @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                So now trying to upload a 8GB zip file via the File Manager... not sure that's going to work...

                Can confirm, we have never tested such big sizes 🙂 Let us know how it goes...

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

                @girish said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                Can confirm, we have never tested such big sizes Let us know how it goes...

                Took a LONG time, but...

                Worked!

                8.76GB. Pretty sure that wouldn't have worked on my old laptop, but this one has 64GB ram, so that's gotta help!

                re the amount of time it took: is there a way I could've ssh'd into /app/data/ instead and just used scp or something?

                I use Cloudron with Gandi & Hetzner

                1 Reply Last reply
                1
                • fbartelsF fbartels

                  Hi @jdaviescoates,

                  @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                  Do I need to update my existing server to 20.04 before migrating?

                  no, the only thing that matters for this is the version of Cloudron itself. The OS does not need to have the same version pre and post migration.

                  Without any downtime is not possible. At the very least you need to account for the time the restore actually takes (so in case the backup location is either local to the new server or on a really fast internal network). DNS migration was for me no problem the last time, since I am using Cloudflare for dns and there Cloudron will take care of updating dns records automatically.

                  I went a similar route some time ago and also went a bit overboard with preparation. So I ended up creating a small script that triggers the full cloudron backup, polls if the backup has completed successfully and then shut down the old server (plus sending me a simple notification through telegram). I linked to my script and writeup in https://forum.cloudron.io/post/47255.

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

                  @fbartels said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                  Without any downtime is not possible.

                  It seems that using the Dry run feature perhaps it is possible to do without any downtime, because then you can wait for everything to restore before syncing DNS...

                  That's what I'm going to try anyway, then once it seems DNS has propagated I'll power down my old server and it should be all smooth... 🤞

                  I use Cloudron with Gandi & Hetzner

                  jdaviescoatesJ 1 Reply Last reply
                  1
                  • jdaviescoatesJ jdaviescoates

                    @fbartels said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                    Without any downtime is not possible.

                    It seems that using the Dry run feature perhaps it is possible to do without any downtime, because then you can wait for everything to restore before syncing DNS...

                    That's what I'm going to try anyway, then once it seems DNS has propagated I'll power down my old server and it should be all smooth... 🤞

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

                    OK, so it seems to have gone very smoothly! 👌

                    One thing I didn't properly think about though: email

                    I'm now missing a few hours of email (the time between the time I took the back I restored to the new server and making DNS changes live).

                    I obviously still have the email on my old server, but how to get them over to the new one? @girish (I'd guess @d19dotca might know too? 🙂 )

                    And another email issue too: of course my IP has now changed, and joy! 3 blacklists have my IP on

                    If I'd thought about it I would've checked that before moving Cloudron to a new server and get the IP off the lists beforehand. Would be good to add this suggestion (checking IP of new email on spam blacklists and attempting to get it delisted before moving) to the docs.

                    I think there may be a bug in the UI too. My IP is on blocklists but this is how it looks under email status - correct red sign, but incorrect text (which I guess should be listing the blocklists the IP is on?):

                    8c16c1c2-d0a0-4ff5-b6a5-0512e7cf1469-image.png

                    And another email thing: need to change the PTR record on my new server as well (also worth adding to the docs methinks)

                    I needed to Renew certs too.

                    I use Cloudron with Gandi & Hetzner

                    d19dotcaD 1 Reply Last reply
                    1
                    • jdaviescoatesJ jdaviescoates

                      OK, so it seems to have gone very smoothly! 👌

                      One thing I didn't properly think about though: email

                      I'm now missing a few hours of email (the time between the time I took the back I restored to the new server and making DNS changes live).

                      I obviously still have the email on my old server, but how to get them over to the new one? @girish (I'd guess @d19dotca might know too? 🙂 )

                      And another email issue too: of course my IP has now changed, and joy! 3 blacklists have my IP on

                      If I'd thought about it I would've checked that before moving Cloudron to a new server and get the IP off the lists beforehand. Would be good to add this suggestion (checking IP of new email on spam blacklists and attempting to get it delisted before moving) to the docs.

                      I think there may be a bug in the UI too. My IP is on blocklists but this is how it looks under email status - correct red sign, but incorrect text (which I guess should be listing the blocklists the IP is on?):

                      8c16c1c2-d0a0-4ff5-b6a5-0512e7cf1469-image.png

                      And another email thing: need to change the PTR record on my new server as well (also worth adding to the docs methinks)

                      I needed to Renew certs too.

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

                      @jdaviescoates I haven’t really had to manually transfer mail over yet but if you still have the old server running I suppose you could follow the steps here: https://docs.cloudron.io/backups/#restore-email

                      In my experience of moving servers I’ve usually actually shut down the mail container during the backup process so that it can’t take any new email and that way I know the backup is the absolute latest. Then I don’t turn it back on ever on the old server and immediately update the DNS and PTR records to point to the new server and propagated a bit.

                      --
                      Dustin Dauncey
                      www.d19.ca

                      jdaviescoatesJ 1 Reply Last reply
                      1
                      • d19dotcaD d19dotca

                        @jdaviescoates I haven’t really had to manually transfer mail over yet but if you still have the old server running I suppose you could follow the steps here: https://docs.cloudron.io/backups/#restore-email

                        In my experience of moving servers I’ve usually actually shut down the mail container during the backup process so that it can’t take any new email and that way I know the backup is the absolute latest. Then I don’t turn it back on ever on the old server and immediately update the DNS and PTR records to point to the new server and propagated a bit.

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

                        @d19dotca said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                        if you still have the old server running I suppose you could follow the steps here: https://docs.cloudron.io/backups/#restore-email

                        I don't think that will help me right now as the missing emails are in any backups (yet).

                        I guess I could try:

                        1. add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                        2. boot up my old server and run a backup
                        3. Then try the restore email thing linked above by copying the relevant files from one server to the other (not sure how exactly I'd do that, I guess maybe with scp or something)

                        But I wonder if another option would be to

                        1. add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                        2. boot up my old server and run a backup
                        3. restore this new backup of the old server into the new server (although I guess this could now get messy - what would happen with emails that have since arrived on the new server).

                        I think I'll wait for some input from @staff before proceeding...

                        I use Cloudron with Gandi & Hetzner

                        d19dotcaD 1 Reply Last reply
                        0
                        • jdaviescoatesJ jdaviescoates

                          @d19dotca said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                          if you still have the old server running I suppose you could follow the steps here: https://docs.cloudron.io/backups/#restore-email

                          I don't think that will help me right now as the missing emails are in any backups (yet).

                          I guess I could try:

                          1. add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                          2. boot up my old server and run a backup
                          3. Then try the restore email thing linked above by copying the relevant files from one server to the other (not sure how exactly I'd do that, I guess maybe with scp or something)

                          But I wonder if another option would be to

                          1. add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                          2. boot up my old server and run a backup
                          3. restore this new backup of the old server into the new server (although I guess this could now get messy - what would happen with emails that have since arrived on the new server).

                          I think I'll wait for some input from @staff before proceeding...

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

                          @jdaviescoates said in Server migration tips? Need same ubuntu version? Possible to do without downtime?:

                          I guess I could try:

                          add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                          boot up my old server and run a backup
                          Then try the restore email thing linked above by copying the relevant files from one server to the other (not sure how exactly I'd do that, I guess maybe with scp or something)

                          But I wonder if another option would be to

                          add the ip of my old server to my /etc/hosts file on my laptop so I can access it again post DNS changes
                          boot up my old server and run a backup
                          restore this new backup of the old server into the new server (although I guess this could now get messy - what would happen with emails that have since arrived on the new server).

                          I'd recommend the first option there to avoid overriding any emails on the new server which aren't on the old server. The first steps would be good because then you'd get a backup again you can follow the steps from the docs at that point to restore emails, essentially merging with the new server afterwards.

                          Definitely will be interested if @staff has any other recommendations though, will be good to know for future.

                          --
                          Dustin Dauncey
                          www.d19.ca

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