From 73feb85ed06d758f2b1962311c99642b2a3db46b Mon Sep 17 00:00:00 2001 From: valentinab25 <30239069+valentinab25@users.noreply.github.com> Date: Fri, 16 Mar 2018 11:18:39 +0200 Subject: [PATCH] Update Readme.md --- Readme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Readme.md b/Readme.md index 621a938..5dec849 100644 --- a/Readme.md +++ b/Readme.md @@ -49,3 +49,34 @@ Bring the `file` on client: $ docker exec -it rsync_client sh $ rsync -e 'ssh -p 2222' -avz root@foo.bar.com:/data/ /data/ $ ls -l /data/ + +### Rsync data between containers in Rancher + +0. Request TCP access to port 2222 to an accessible server of environment of the new installation from the source container host server. + +1. Start **rsync client** on host from where do you want to migrate data (ex. production). + + Infrastructures -> Hosts -> Add Container + * Select image: eeacms/rsync + * Command: sh + * Volumes -> Volumes from: Select source container + +2. Open logs from container, copy the ssh key from the message + +2. Start **rsync server** on host from where do you want to migrate data (ex. devel). The destination container should be temporarily moved to an accessible server ( if it's not on one ) . + + Infrastructures -> Hosts -> Add Container + * Select image: eeacms/rsync + * Port map -> +(add) : 2222:22 + * Command: server + * Add environment variable: SSH_AUTH_KEY="" + * Volumes -> Volumes from: Select destination container + + +3. Within **rsync client** container from step 1 run: + + ``` + $ rsync -e 'ssh -p 2222' -avz root@: + ``` + +4. The rsync servers can be deleted, and the destination container can be moved back ( if needed )