Skip to content

Commit

Permalink
Update backup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jskz authored Feb 8, 2021
1 parent c93c828 commit 4c24009
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ if [ "$INPUT_TYPE" = "db" ]; then

if [ "$INPUT_DB_TYPE" = "mysql" ]; then
FILENAME=$INPUT_DB_TYPE-$INPUT_DB_NAME.$THEDATE.sql
OUTPUT_ZIP=$FILENAME.zip
INPUT_DB_PORT="${INPUT_DB_PORT:-3306}"

if [ ! -z "$INPUT_DB_PASS" ] && [ "$INPUT_DB_PASS" != "" ]; then
INPUT_PASS="-p'$INPUT_DB_PASS'"
fi
INPUT_SCRIPT="mysqldump -q -u $INPUT_DB_USER -P $INPUT_DB_PORT $INPUT_PASS $INPUT_ARGS $INPUT_DB_NAME > $FILENAME && zip --password $INPUT_ZIP_PASSWORD $FILENAME.zip $FILENAME"
INPUT_SCRIPT="mysqldump -q -u $INPUT_DB_USER -P $INPUT_DB_PORT $INPUT_PASS $INPUT_ARGS $INPUT_DB_NAME > $FILENAME && zip --password $INPUT_ZIP_PASSWORD $OUTPUT_ZIP $FILENAME"
fi

if [ "$INPUT_DB_TYPE" = "mongo" ]; then
Expand Down

0 comments on commit 4c24009

Please sign in to comment.