mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-22 08:21:04 +01:00
Solved shellcheck error
This commit is contained in:
parent
9cff82fa49
commit
5cc5a6e5e5
@ -11,7 +11,7 @@ backup_repository_folder="$backups_folder$machine_id/$repository_name/";
|
|||||||
for volume_name in $(docker volume ls --format '{{.Name}}');
|
for volume_name in $(docker volume ls --format '{{.Name}}');
|
||||||
do
|
do
|
||||||
echo "start backup routine: $volume_name";
|
echo "start backup routine: $volume_name";
|
||||||
for container_name in $(docker ps -a --filter volume=$volume_name --format '{{.Names}}');
|
for container_name in $(docker ps -a --filter volume="$volume_name" --format '{{.Names}}');
|
||||||
do
|
do
|
||||||
echo "stop container: $container_name" && docker stop "$container_name"
|
echo "stop container: $container_name" && docker stop "$container_name"
|
||||||
for source_path in $(docker inspect --format "{{ range .Mounts }}{{ if eq .Type \"volume\"}}{{ if eq .Name \"$volume_name\"}}{{ println .Destination }}{{ end }}{{ end }}{{ end }}" "$container_name");
|
for source_path in $(docker inspect --format "{{ range .Mounts }}{{ if eq .Type \"volume\"}}{{ if eq .Name \"$volume_name\"}}{{ println .Destination }}{{ end }}{{ end }}{{ end }}" "$container_name");
|
||||||
|
Loading…
Reference in New Issue
Block a user