mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-24 09:11:04 +01:00
Solved bug
This commit is contained in:
parent
a778ec7fcf
commit
7594f5047d
@ -12,7 +12,7 @@ do
|
|||||||
echo "stop container: $docker_container_name" && docker stop "$docker_container_name"
|
echo "stop container: $docker_container_name" && docker stop "$docker_container_name"
|
||||||
for source_path in $(docker inspect --format '{{ range .Mounts }}{{ if eq .Type "volume" }}{{ println .Destination }}{{ end }}{{ end }}' "$docker_container_name");
|
for source_path in $(docker inspect --format '{{ range .Mounts }}{{ if eq .Type "volume" }}{{ println .Destination }}{{ end }}{{ end }}' "$docker_container_name");
|
||||||
do
|
do
|
||||||
repository_name="$(basename -s .git `git config --get remote.origin.url`)";
|
repository_name="$(cd $(dirname "$(readlink -f "${0}")") && basename `git rev-parse --show-toplevel`)";
|
||||||
machine_id="$(sha256sum /etc/machine-id | head -c 64)";
|
machine_id="$(sha256sum /etc/machine-id | head -c 64)";
|
||||||
backup_repository_folder="$docker_backups_mount$machine_id/$repository_name/";
|
backup_repository_folder="$docker_backups_mount$machine_id/$repository_name/";
|
||||||
destination_path="$backup_repository_folder""latest/$docker_container_name$source_path";
|
destination_path="$backup_repository_folder""latest/$docker_container_name$source_path";
|
||||||
|
Loading…
Reference in New Issue
Block a user