save-data-dir 235 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 #!/bin/sh data_dir="$1" data_name="$2" shift 2 mkdir -p /var/lib/docker-init/data tar -C "$data_dir" -c . | gzip -9v > "/var/lib/docker-init/data/$data_name.data.tar.gz" find "$data_dir" -mindepth 1 -maxdepth 1 -exec rm -rf '{}' ';'