Sha256: 37bf067e10015adeed31106eaf8aeb82de085184d4af865ab943c015c586cac3
Contents?: true
Size: 606 Bytes
Versions: 7
Compression:
Stored size: 606 Bytes
Contents
#!/bin/bash <%volumes(app_name,@service).each_with_index do |v,i|%> mkdir -p $1/<%="#{@service}/#{@service}_#{i}"%> <%end%> data_container_id=$(sudo docker-compose ps -q <%=@service%>) sudo docker run --rm --volumes-from $data_container_id <%=volumes(app_name,@service).each_with_index.map{|volume,i|"-v $1/#{@service}/#{@service}_#{i}:/backup/#{@service}_#{i}"}.join(" ")%> ubuntu:14.04 /bin/bash -c '<%=volumes(app_name,@service).each_with_index.map{|v,i|"echo \"/#{v}\" > /backup/#{@service}_#{i}/backup.descriptor && tar -czpf /backup/#{@service}_#{i}/#{@service}_#{i}.tar.gz /#{v}"}.join(" && ")%>'
Version data entries
7 entries across 7 versions & 1 rubygems