This file contains hidden or 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
#!/bin/bash | |
# this requires the backblaze CLI tool to be installed (pip install b2) | |
# pass 4 args: | |
# - database name (needs to exist in postgres) | |
# - bucket name (target of the upload) | |
# - file containing b2 credentials (it will be sourced and needs to set B2_ACCOUNT_ID and B2_APP_KEY) | |
# | |
# example: ./pg_b2_backup.sh db backups-daily ~/b2_creds | |
# |