diff --git a/Scripts/Bash/Transfer Docker Containers.md b/Scripts/Bash/Transfer Docker Containers.md index 40a90af..9619c82 100644 --- a/Scripts/Bash/Transfer Docker Containers.md +++ b/Scripts/Bash/Transfer Docker Containers.md @@ -3,16 +3,36 @@ If you find that you need to migrate a container, along with any supporting file 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 -``` + +=== "Safe Method" + + ``` sh + sudo mkdir -p /srv/containers/example + sudo chmod 740 /srv/containers/example + sudo chown nicole:nicole /srv/containers/example + ``` + +=== "Quick & Dirty Method" + + ``` sh + sudo mkdir -p /srv/containers + sudo chmod 777 /srv/containers + ``` + !!! warning You need to stop the running containers on the old server before copying their data over, otherwise the state of the data may be unstable. Once you have migrated the data, you can spin up the containers on the new server and confirm they work before deleting the data on the old server. 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 + +=== "Safe Method" + + ``` sh + rsync -avz -e ssh --progress /srv/containers/example/* nicole@192.168.3.30:/srv/containers/example + ``` + +=== "Quick & Dirty Method" + + ``` sh + rsync -avz -e ssh --progress /srv/containers/example nicole@192.168.3.30:/srv/containers + ``` \ No newline at end of file