Skip to content

Instantly share code, notes, and snippets.

@tetheredge
Forked from evanscottgray/storage_migration.md
Last active August 29, 2015 14:08
Show Gist options
  • Save tetheredge/cf2badbed184dc6ea7eb to your computer and use it in GitHub Desktop.
Save tetheredge/cf2badbed184dc6ea7eb to your computer and use it in GitHub Desktop.

Migrating Docker Storage....

Stop Docker Service

rdocker-cli.rb restart_docker_service IP

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="--insecure-registry 10.6.195.13:5000 -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