Skip to content

Instantly share code, notes, and snippets.

@colincoghill
colincoghill / backup_container.sh
Created November 27, 2014 18:28
docker backup script
#!/bin/sh
# Given a container name, find the exposed volumes in the container
# and back them up into a tgz
# backup_container graphite_data backup.tgz
CONT=$1
OUTFILE=$2

Keybase proof

I hereby claim:

  • I am colincoghill on github.
  • I am mugginsm (https://keybase.io/mugginsm) on keybase.
  • I have a public key whose fingerprint is C3E1 2A4E 05CD B1D2 6602 C31D 030F 291C 37D3 D0DC

To claim this, I am signing this object:

# JSON serialize an object, returns a generator that will yield in approximate
# sized chunks.
import json
def chunk_up(gen, csize):
""" Gather the string output from a generator and yield it in
chunks of approximately "csize" bytes.
"""