Created
October 26, 2018 18:28
-
-
Save skwp/40372e775dd291f78072e26c46939494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BUCKET=our.s3.bucket.com | |
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | |
docker stop bitcoin | |
tar --exclude='.lock' --exclude='debug.log' --exclude='peers.dat' --exclude='banlist.dat' -czvf /tmp/bitcoin.tgz /var/bitcoin/ | |
/usr/local/bin/aws s3 cp /tmp/bitcoin.tgz s3://$BUCKET/bitcoin-backups/$DATE/$(hostname)/bitcoin.tgz | |
docker start bitcoin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment