Skip to content

Instantly share code, notes, and snippets.

@evanscottgray
Created September 24, 2014 17:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evanscottgray/3fdf9d52c4b29582ccdc to your computer and use it in GitHub Desktop.
Save evanscottgray/3fdf9d52c4b29582ccdc to your computer and use it in GitHub Desktop.
docker storage migration wow

Migrating Docker Storage....

Stop Docker Service

service docker stop

Copy all the things!

mkdir /pods/docker_data
rsync -avh --progress /var/lib/docker/ /pods/docker_data/

Edit /etc/default/docker to look like this*:

# Docker Upstart and SysVinit configuration file

DOCKER_OPTS="-H=tcp://0.0.0.0:1337 --api-enable-cors -g /pods/docker_data"

*Heads up! If you're doing this on a hypervisor that is touched by the automation in rdocker-cli then you'll need to edit this line in labsalt to include your salt id.

Reboot for good measure

reboot

Once you're back in, do a docker info to make sure the storage directory is pointed to the right place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment