|
|
# How to copy files from a docker container:
|
|
|
|
|
|
To be cleaned up!!!
|
|
|
|
|
|
## To be done in yggdrasil.gen-europe.org
|
|
|
* Log in to yggdrasil.gen-europe.org using ssh
|
|
|
* execute ``docker exec -it yggdrasil_geneuwp_1 bash``
|
|
|
* go to ``/var/www``
|
|
|
* execute ``tar -czvf 2020.04.28_html.tar.gz html/``
|
|
|
* exit the docker container: ``exit``
|
|
|
* Copy the created compressed file to the server main memory: ``docker cp yggdrasil_geneuwp_1:/var/www/2020.04.28.html.tar.gz ~/wp-backups/wpdev/2020.04.28.html.tar.gz``
|
|
|
|
|
|
## To be done in local machine (or another server)
|
|
|
* Go to ``/var/www/html/gen-europe.org/public_html``:
|
|
|
* Sync the data from yggdrasil ``rsync -avz --progress angel@yggdrasil.gen-europe.org:~/wp-backups/2020.04.14_wpdev.tar.gz 2020.04.14_wpdev.tar.gz``
|
|
|
* Uncompress the file: ``tar -xvzf 2020.04.14_wpdev.tar.gz``
|
|
|
* Go to the corresponding folder, e.g.: ``cd /var/www/html/gen-europe.org``
|
|
|
* Copy the files: ``cp -r /var/www/html/gen-europe.org/public_html/home/angel/wp-backups/wpdev/html /var/www/html/gen-europe.org``
|
|
|
* ``rm -rf public_html/``
|
|
|
* ``mv html public_html``
|
|
|
|
|
|
# How to do copy files into the docker container:
|
|
|
|
|
|
* We copy the compressed file into the container: ``docker cp ~/wp-backups/wpdev/2020.04.28.html.tar.gz newgeneuwp:/var/www``
|
|
|
* Enter the continer: ``docker exec -it newgeneuwp bash``
|
|
|
* go to ``/var/www``
|
|
|
* Uncompress the file: ``tar --overwrite -xvzf 2020.04.28.html.tar.gz`` |
|
|
\ No newline at end of file |