TechPerplexed / Gooby

Gooby: The ultimate infinite Plex media server using a VPS and Cloud service
https://bit.ly/Tech_Perplexed
GNU General Public License v3.0
286 stars 43 forks source link

Migration from Ubuntu to Debian #204

Closed bifa2 closed 2 years ago

bifa2 commented 2 years ago

Hi,

I noticed that you changed the recommended distro from Ubuntu to Debian and I'm considering making the switch over at some point (assuming it's worth all the work and potential downtime). Wanting to keep my existing "installation" of Plex (i.e. database and all settings), how would you go about doing this? It'd be nice to get it fully documented perhaps for those making the switch over but at the moment I only have something incredibly basic and I'm not certain what order things need to be done in:

  1. Patch everything up to date on Ubuntu (e.g. docker containers for plex, etc).
  2. Take a backup of some folders containing container data, docker configs etc?
  3. Install Debian.
  4. Install Gooby on Debian.
  5. Create user.
  6. Initialise Gooby.
  7. Install services but don't configure?
  8. Restore backed up folders (from Ubuntu) to Debian and ... restart the box?

Not sure if permissions on files/folders would be an issue?

Cheers!

TechPerplexed commented 2 years ago

Well, luckily Gooby really takes care of the backup and restore process almost from start to finish. To be on the really safe side though, I would suggest you create the backup on server A, and restore it on server B. Once you verify that it's all working, you can erase server A. However, if that is not possible, the easiest scenario is probably

  1. Create a full backup using the Gooby menu
  2. Copy the content of ~/.config/rclone/rclone.conf manually to a text file outside your server
  3. Wipe the server and install Debian from scratch
  4. Restore the content of your Rclone config file to the above location
  5. Install Gooby (create user, specify domain and email, then start the menu)
  6. Install Rclone from the menu. Since you already have the config file in place, all you need to do is enter the letter q and accept the content
  7. Restore the full backup from the menu
  8. Run rclean

Your server should behave as if it never went away :)

Again, ideally you'll perform steps 1 and 2 on server A and steps 3 to 8 on server B, but... I have wiped my server several times and never ran into issues.

TechPerplexed commented 2 years ago

One word of caution though: Gooby doesn't seem to play nice with Debian 11 yet, so please consider Debian 10 instead.

Alternatively, you could wait till we finish some "super secret project" and go live with that... no timeline on that yet, but it won't be years either ^_^ Sneak peak (though please don't try this on your main server until we go public): https://github.com/TechPerplexed/Gooby/tree/omni

Edit: thanks by the way for the suggestion to document the migration process. We're still busy writing the NEW tutorials and I'll definitely use the information above for our documentation :)

bifa2 commented 2 years ago

Thanks for this - I'll give the migration work a go over the next week or two. Luckily I manage VMs for a living so I can create and snapshot to my heart's content which certainly helps with work like this! Good tip on Debian 10/11... I'd already downloaded 11 so I'll switch to 10.

As for Omni, sounds exciting! I'll definitely look at that after the above, on a brand new server, perhaps with rclone and encryption for cloud storage (which I don't currently have/use).

If you want to close this case please go ahead and I can reopen if I get stuck 😅

TechPerplexed commented 2 years ago

Ok I'll close it, I just noticed that I had you restore the Rclone config before creating the user.. it needs to be done the other way around of course, otherwise the user folder doesn't exist yet.

Other than that: good luck with the migration! And yes I'd love to know how a Gooby to Omni upgrade test would go as well 😊