Move Docker image


azzilla

Recommended Posts

I had a BTRFS error on my cache pool so i hade to format. I backed up my app data with this guide but something went wrong and I was not able to save the docker images. 

I set up my docker when I installed Unraid a long time ago and managed to set the docker image to rest on a share that i named "Docker".

This (at least i think) resulted in the docker programs acting up. Radarr isn't finding any media, can't Unifi Controller loses it's config.

 

Reading the guide for setting up Docker and of course, the recommendation is to set the Docker image directly to the Cache device.

 

Can I move the Docker image to the cache drive with midnight commander or some other way without loosing the docker apps?

 

 

  • Like 1
Link to comment

The docker image normally only holds the binaries for the containers and not their variable data.

 

Assuming that is how you are using docker in this manner then the easiest thing to do is;

  • stop the docker service under Docker->Settings
  • if you are using the ‘appdata’ share to hold the docker container’s variable data make sure the share is set to Use Cache=Prefer.   You can now run mover to get ‘appdata’ files that are on the array moved to the cache disk
  • delete the existing docker image file

  • in the docker Settings specify the new location to be used for the docker image.

  • restart the docker service.   This will create a new empty docker image file.
  • use the Previous Apps option in Community Applications to re-instate your dockers (with their existing Settings).   At this point you can adjust (if necessary) any settings you want to change.   As you add each container back, the latest binaries will be downloaded and added to the docker image.
  • Like 1
  • Thanks 1
Link to comment
  • 1 year later...
28 minutes ago, dkerlee said:

How about changing the system share to Use Cache=Prefer, stopping Docker and VM, then running mover?

As long as you disable the Docker and VM services, then yes. It's not enough to just stop the containers and VM's. The docker and VM's tab should be gone from the GUI during the move.

  • Like 1
Link to comment

thanks a million, did like you said, back up and running with zero issues. Thanks! That would make a tidy wiki entry somewhere...

For posterity:

 

1. stop VM and Docker services through Settings

2. changed Share "system" to Prefer cache drive (location of docker.img)

3. ran mover, waited to complete

4. Started Docker service. While my Apps/Dockers appeared to be present and working...

5. Got this error message

Quote

"Your existing Docker image file needs to be recreated due to an issue from an earlier beta of unRAID 6. Failure to do so may result in your docker image suffering corruption at a later time. Please do this NOW!"

6. Deleted docker.img using a terminal

7. went to APPS tab, then Previous Apps on left

8. Selected all the Apps I'd been using (I also increased my docker image file a bit, I'd been hitting 70% regularly), installed all Apps

 

Back up and running with all settings and previous stuff, no worries. Nice one folks! Thanks a million.

  • Like 1
Link to comment
  • 1 month later...

Thank you @itimpi

I got a corrupted docker.img file and had installed a bunch of dockers in the last few months that took me quite a while.  The info below was a life saver.  

"use the Previous Apps option in Community Applications to re-instate your dockers (with their existing Settings)."

Thanks

Joe

 

Link to comment
  • 8 months later...

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.