Sha256: bee8c1a3433a7233aa9a074e4f8a68c95431b2d0c4d9351e716a1db60df920b2
Contents?: true
Size: 609 Bytes
Versions: 4
Compression:
Stored size: 609 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dockersitter-0.8.1 | lib/templates/backup.erb |
dockersitter-0.8.0 | lib/templates/backup.erb |
dockersitter-0.7.0 | lib/templates/backup.erb |
dockersitter-0.6.0 | lib/templates/backup.erb |