Skip to content

Instantly share code, notes, and snippets.

View cjohnson318's full-sized avatar

Connor Johnson cjohnson318

View GitHub Profile
@mark-rushakoff
mark-rushakoff / backup_restore.bash
Last active November 16, 2020 14:53
Backup and restore influxdb inside Docker
#!/bin/bash
set -e
# Default working directory to current directory, but allow override via WORKDIR environment variable.
WORKDIR=${WORKDIR:-$PWD}
NOW="$(date +%s)"
INFLUXDIR="$WORKDIR/influxdb-$NOW"
BACKUPDIR="$WORKDIR/backup-$NOW"