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 | |
WORKSPACE_DIR="/tmp/postgres_bkp" | |
DB_URL="$1" | |
BACKUP_FILENAME="$2" | |
S3_CMD=$(which s3cmd) | |
SPACES_BUCKET="your-bucket-here" | |
if [ -z "$DB_URL" ] || [ -z "$BACKUP_FILENAME" ]; then | |
echo "You must set database connection and output filename !!!"; |
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 | |
# errexit -> exit when any command fails | |
set -o errexit | |
# will fails exit if an pipe command fails | |
set -o pipefail | |
# nounset -> exit when an unsed variable is used | |
set -o nounset |
OlderNewer