Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Move docker images to another unRaid server

Featured Replies

Both servers are unRaid v6.6.6

 

Is this possible?

Is everything needed contained within the docker image? Or are there additional directories/files that also need to be transferred.

 

Thank You.

  • Author

I made some headway.

 

Open a terminal and change to the dir you want to save the image.

 

# Display a list of installed docker images.
docker ps

 

# Use the name of the docker image and zip it up.
docker export PlexMediaServer | gzip > PlexMediaServer.tar.gz

 

# Copy it to the new server.

 

# Open a terminal and change to the directory where you saved the tar.gz file on the new server.

# Import the docker image. The name, plexmediaserver, must be in lower case.

zcat PlexMediaServer.tar.gz | docker import - plexmediaserver

 

Now checking the Docker tab in unRaid i see this.

 

image.png.99d709a6c928d22d7b1a10c76a982b18.png

 

# Launch the docker container.

 

docker run -i -t plexmediaserver /bin/bash

 

image.thumb.png.41814641592df492b9612596172748c9.png

 

But there is no way to connect to it or edit it.

 

image.png.d9f466abc45092da64d5502e18c780ee.png

 

  • Community Expert
3 hours ago, chris1259 said:

Both servers are unRaid v6.6.6

 

Is this possible?

Is everything needed contained within the docker image? Or are there additional directories/files that also need to be transferred.

 

Thank You.

Normally the docker images only contain the binaries - all variable data is external to the docker.    The normal place to configure for this variable data is under the appdata share, although it is up to the user where such data is placed.

Easiest solution is to just copy across your /appdata share and then repull the containers from Docker hub.  Just make sure your volume mounts are still valid on the second server.

 

You could also copy across the XML files from your flash to have easy access to the templates as you've configured them.

 

Essentially there are only two points in the docker ecosystem on Unraid where the data is custom to your install.  Appdata and XML files.

 

Personally I'd just copy across the appdata and recreate the containers manually so you can still leverage CA for reinstalling/management.

Edited by CHBMB

  • Author
Just now, CHBMB said:

Easiest solution is to just copy across your /appdata share and then repull the containers from Docker hub.

That's what i was hoping for. I see this /mnt/%username%/appdata/PlexMediaServer/. I will try what you suggested.

  • Community Expert

There is no need to copy or transfer the docker image. Its contents, which is just the executable code for each container, are downloaded when a docker is installed or updated. What might be worthwhile transferring is the appdata for your dockers, and the templates for each. Probably you already know where the appdata is. The templates are on flash in config/plugins/dockerMan/templates-user. The templates contain the settings for each container, which is all those things you have to fill out when you create or edit a container, such as the mappings, etc.

  • Author
1 minute ago, CHBMB said:

Huh, it should be /mnt/user/appdata

i was using %username% as a variable in this case.

But it isn't a variable.

 

I'm not being arsey, just want to ensure you understand the file structure before you start copying stuff to /mnt/chris1259/appdata and find yourself wondering where it all went when you restarted your server, as I think it would be in RAM and "poof" disappear.

Edited by CHBMB

  • Author
1 minute ago, CHBMB said:

But it isn't a variable.

I didn't want to assume that everyone had "user" in their path.

Just now, chris1259 said:

I didn't want to assume that everyone had "user" in their path.

They do, it's part of the filesystem.

  • Author

Got it. I will report back the steps i took to get it working.

One easy way to do it, power down the server with your appdata on (which should all be on a cache disk, not sure I'd try this with a BTRFS pool)  and mount it in the new server with unassigned devices, then copy from disk to array.  (Make sure you copy rather than move!! And I'd probably back it up on server 1 before doing this as well, can't be too careful.)

  • Community Expert
55 minutes ago, chris1259 said:

I didn't want to assume that everyone had "user" in their path.

All user shares are mounted in /mnt/user. Simple as that.

  • 1 month later...
  • Author

I ended not moving the dockers and would suggest having a tab open on each server to transfer the settings over manually.

 

All the attempts to copy over the appdata directory were unsuccessful as i didn't want to remove the cache drive from the server. So no matter what i tried, i was struck with symbolic link errors, rights errors, copy errors, you name it.

 

But thanks for trying to help.

  • 1 year later...
On 1/16/2019 at 6:57 PM, CHBMB said:

Easiest solution is to just copy across your /appdata share and then repull the containers from Docker hub.  Just make sure your volume mounts are still valid on the second server.

 

You could also copy across the XML files from your flash to have easy access to the templates as you've configured them.

 

Essentially there are only two points in the docker ecosystem on Unraid where the data is custom to your install.  Appdata and XML files.

 

Personally I'd just copy across the appdata and recreate the containers manually so you can still leverage CA for reinstalling/management.

Hm

I am looking into this concern as well. I currently have a cache disk in production (xfs) that I need to recreate on a new cache disk (btrfs) so I can make a raid1 cache set.
I attempted to add a second cache disk to the production array (xfs) and when I added the second cache disk it stated UNMOUNTABLE: NO POOL UUID. 

So my thoughts are I need to backup my current production cache appdata folder to an offline disk

format my current cache disk to btrfs

enable docker so it creates a blank image

add all the docker containers

then copy app data back

 

I feel this may pose concerns but I am not sure.

I also do use CA backup and restore but never have restored from it, maybe this will make the process smoother, I don't know

Edited by bombz

  • Community Expert
8 hours ago, bombz said:

I attempted to add a second cache disk to the production array (xfs) and when I added the second cache disk it stated UNMOUNTABLE: NO POOL UUID. 

You can't add a device to an xfs cache.

15 hours ago, JorgeB said:

You can't add a device to an xfs cache.

OK good to know. So I will be required to convert my existing cache to btrfs in order to create a cache pool in RAID1 if that's the case.

  • 3 weeks later...

Following up here as I am a little confused with the process I am attempting to do

Overview/Plan: (SSD cache disks)
Backup my current cache disk (XFS)
Format my current cache disk (to btrfs)
Format a second cache disk (to make a pool or RAID1) cache disk set which the filesystem needs to be btrfs in order to do this

Right now I have (1x) cache disk in my array used for docker (I don't use VMs or Mover)
https://wiki.unraid.net/Replace_A_Cache_Drive
I followed up to step 5

I powered down my array and made a 1:1 block copy of my current cache drive to another SSD. (block copy takes partition data with it)

Now what I want to do:
Power up my array with my current cache disk
Format the current cache disk to btrfs
Add slot 2 (second SSD cache disk) and also format to btrfs
Create a cache pool in RAID1
*which I would have 2x cache disk preset*
Add my backed up cache disk (XFS) to Unassigned Devices to copy data from that UD disk, back to the pool RAID1 cache disk set
start the array.

With how I am looking at this or my situation will this work? 
Copy the root folders from the backed up cache SSD (xfs) disk using UD to the cache pool RAID1 set (unsure if UD can read XFS disk)
Then start my docker (via Settings > Docker > Enable > Yes) -- which will create a new docker.img on the pool disk set
Then start all my docker containers
and that's it... I should be finished?

I am hesitant to do this as part of me thinks the dockers will not work so I want to clarify with the community before proceeding

Thanks,

Edited by bombz

On 3/1/2021 at 3:59 AM, JorgeB said:

After restoring appdata to its original location see here:

https://forums.unraid.net/topic/57181-docker-faq/?do=findComment&comment=564309

 

Based on this, it is not recommended to copy my docker.img from my current cache disk to my new cache pool? 
Will my templates (on flash) be OK, as in will they point to all my containers and my current container settings will be OK.
Basically trying to to a straight copy of current cache to new cache pool, without many changes

* Using mc or any file manager or the command line, move docker.img to the desired location (/mnt/cache/docker.img is recommended)

 

Will my templates remain unaffected if I am moving my docker.img to another location, then creating the new cache pool, and copying this docker.img back? Or will the templates even work being the new cache pool is new disk (disk make, model, etc.)?

  • Community Expert
1 hour ago, bombz said:

Based on this, it is not recommended to copy my docker.img from my current cache disk to my new cache pool? 

Yes, just re-create like explained in the link.

  • 3 weeks later...
On 3/3/2021 at 9:01 AM, JorgeB said:

Yes, just re-create like explained in the link.

Seems I have successfully made the migration to
a replacement cache disk 
reinstalled all containers
had to recreate networks for docker (didn't know that)

added a second cache disk (cache pool)

updated to the latest OS

Everything seems to be running OK

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.