mirror of
https://github.com/gdiepen/docker-convenience-scripts.git
synced 2025-04-28 10:13:41 +01:00
upd readme
This commit is contained in:
parent
f8f8a6a9cf
commit
7fe8649321
2 changed files with 18 additions and 14 deletions
16
README.md
16
README.md
|
@ -11,9 +11,23 @@ to ensure I have the latest production data also at development.
|
|||
|
||||
You can find more details in my blog post [Cloning Docker Data Volumes](https://www.guidodiepen.nl/2016/05/cloning-docker-data-volumes/)
|
||||
|
||||
## docker_clone_volume_across_servers.sh
|
||||
|
||||
The script relates to the above one, in addition, it adds the possibility to transfer named volume from one host machine to another.
|
||||
|
||||
It is worth noting, that :
|
||||
* you should have running docker daemon and have ssh available on both hosts;
|
||||
* you ought to have access to root;
|
||||
* you might want be ensured that your destination containers are stopped before copying the volume.
|
||||
|
||||
Refer to [stackoverflow topic](https://stackoverflow.com/questions/42973347/how-to-copy-docker-volume-from-one-machine-to-another).
|
||||
|
||||
### to do
|
||||
check if target volume has already existed (or not needed, cauz user merely should understand circumstances)
|
||||
|
||||
## docker_get_data_volume_info.sh
|
||||
|
||||
The purpose for this script is that I can easily get a list of details for all data volumes
|
||||
The purpose of this script is that I can easily get a list of details for all data volumes
|
||||
that are currently present. The information that is provided to the user as output is per
|
||||
data volume the current size of the data volume and a list of stopped or running containers
|
||||
that have a link to this data volume, including the image corresponding to the container.
|
||||
|
|
|
@ -40,16 +40,6 @@ then
|
|||
exit
|
||||
fi
|
||||
|
||||
# todo? or not needed, cauz it will just be replaced?
|
||||
#Now check if the destinatin volume name does not yet exist
|
||||
# docker volume inspect $2 > /dev/null 2>&1
|
||||
#
|
||||
# if [ "$?" = "0" ]
|
||||
# then
|
||||
# echo "The destination volume \"$2\" already exists"
|
||||
# exit
|
||||
# fi
|
||||
|
||||
docker run --rm \
|
||||
-v $1:/from alpine ash -c \
|
||||
"cd /from ; tar -czf - . " | \
|
||||
|
|
Loading…
Add table
Reference in a new issue