Moving Dockers, VM's and Apps to new server


Cra7y

Recommended Posts

Hello, I am in the process of migrating my unraid server to new hardware, but can't figure out a good way to move along my docker containers, vm's and apps. (Without configuring them from scratch)
When i search for this issue pages always talks about moving the whole installation including disks and usb drive. However, this is not what i want to do as the old server use 7 500gb old (probably dying) disks that i got for free. Whereas my new server uses 2 brand new 4tb disks.

 

So far i have moved all my shares (except default ones as system, appdata and domains), and just needs docker containers, vm's and apps moved before i can kill my old power hungry server for good.

 

Extra info:

Old disks would not work even if i wanted to move them as the old server is a hp dl380g5 where i needed to use raid 0 on each disk to workaround not having a hba.

Link to comment

I'll let someone else address the VM question, except to ask a question of you. Do any of your VMs require direct hardware access (passthrough)?

 

The configuration of each of your dockers is stored in templates on the flash drive. The Previous Apps feature on the Apps page uses these templates to reinstall your dockers exactly as they were. You should be able to:

  1. Create a new docker image in the system share. This happens when you first enable the docker service.
  2. Copy all the appdata into the appdata share so it will be there for your dockers to use when you reinstall them just as before.
  3. Use the Previous Apps feature to reinstall your dockers. The Previous Apps feature takes care of getting all the mappings, etc. from the templates on flash.

Of course, this assumes that nothing you currently have depends on the specific disks and only works with User Shares for locating the media files, etc. that the docker applications work with.

  • Like 1
Link to comment

Thanks for the answer!

None of the VM's require passthrough, just simple linux machines for different tasks.

I guess some of the dockers like plex and nextcloud requires specific shares, could i move them as you described and then redefine shares afterwards? And what about my mariaDB is that data also stored in appdata?

Edited by Cra7y
Spelling
Link to comment

Your plex library (appdata) expects your media to be at certain paths and these paths are stored in that library (database). Those container paths are mapped to your Unraid storage (host paths). Plex won't work with its existing library unless the plex container finds your media at those same container paths.

 

When you said you had moved your shares, I assumed you meant you had moved all the files and folders for each of the shares, and the share names are the same as you had before. Is this not true?

 

Do you understand container volume mapping? It would be possible to change the mappings so the container paths mapped to different host paths (shares) than you had before, but it would be simpler if your shares names are the same as before, then you wouldn't have to change anything.

 

I don't use mariadb or nextcloud but if you understand container volume mapping these sorts of questions can be figured out pretty easily.

Link to comment

Yes, all shares are moved without changing the names and structure. I just wasn't sure that it necessarily meant that it would just work after moving containers.

I am not sure about "container volume mapping", but if you describe it in few words or send me to some documentation about i would probably understand it. (Guess it's something about where dockers save data?)

Link to comment

Volume mapping is pretty basic to understanding how to configure dockers, and if you understand it you are most of the way to being able to use dockers without relying on other people.

 

I think people are perhaps confused by the word "map". It is a little like a road map or google maps or the other common uses of the word map many people are familiar with, but it is more general in meaning. It is more like the meaning it has in mathematics, or in this case, information theory.

 

A map is simply a correspondence. Just as a place on a road map corresponds to a place in the real world, the docker volume mappings are a correspondence between paths within the docker container, which the container application sees, and the paths in the docker host (Unraid).

 

The other piece to this puzzle is where the user shares are actually stored in Unraid. If you have a user share named Movies, the path to that storage is /mnt/user/Movies.

 

So, for example, with the plex docker, you could have a container volume (path) at /movies, and map that to the host path that corresponds to your Movies user share, /mnt/user/Movies. The plex application would see those files in that user share in /movies.

 

Here is a link to the Docker FAQ with a lot more information:

 

https://forums.unraid.net/topic/57181-real-docker-faq/

 

  • Like 1
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.