diff --git a/Scripts/Bash/Transfer Docker Containers.md b/Scripts/Bash/Transfer Docker Containers.md new file mode 100644 index 0000000..3e86f41 --- /dev/null +++ b/Scripts/Bash/Transfer Docker Containers.md @@ -0,0 +1,15 @@ +**Purpose**: +If you find that you need to migrate a container, along with any supporting files, permissions, etc from an old server to a new server, rsync helps make this as painless as possible. +Be sure to perform the following steps to make sure that you can copy the container's files. + +On the destination (new) server, the directory needs to exist and be writable via the person copying the data over SSH: +``` +sudo mkdir -p /srv/containers/example +sudo chmod 740 /srv/containers/example +sudo chown nicole:nicole /srv/containers/example +``` + +On the source (old) server, perform an rsync over to the new server, authenticating yourself as you will be prompted to do so: +``` +rsync -avz -e ssh --progress /srv/containers/example/* nicole@192.168.3.30:/srv/containers/example +``` \ No newline at end of file