Skip to content

Commit 181b75d

Browse files
committed
Add --quiet to the second aws s3 cp command (copy to B2)
and flip the order of `${MYNAME}` and `${level}` to make the log lines even more tidy. MYNAME is always the same length, but level can be different lengths.
1 parent 6adeda2 commit 181b75d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/backup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
log() {
55
local level="$1";
66
local message="$2";
7-
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ${level}: ${MYNAME}: ${message}";
7+
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ${MYNAME}: ${level}: ${message}";
88
}
99

1010
# Function to remove sensitive values from sentry Event
@@ -150,7 +150,7 @@ if [ "${B2_BUCKET}" != "" ]; then
150150
start=$(date +%s);
151151
AWS_ACCESS_KEY_ID="${B2_APPLICATION_KEY_ID}" \
152152
AWS_SECRET_ACCESS_KEY="${B2_APPLICATION_KEY}" \
153-
aws s3 cp "/tmp/${DB_NAME}.sql.gz" "s3://${B2_BUCKET}/${DB_NAME}.sql.gz" \
153+
aws s3 cp --quiet "/tmp/${DB_NAME}.sql.gz" "s3://${B2_BUCKET}/${DB_NAME}.sql.gz" \
154154
--endpoint-url "https://${B2_HOST}"
155155
STATUS=$?;
156156
end=$(date +%s);

application/restore.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
log() {
55
local level="$1"
66
local message="$2"
7-
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ${level}: ${MYNAME}: ${message}"
7+
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ${MYNAME}: ${level}: ${message}"
88
}
99

1010
filter_sensitive_values() {

0 commit comments

Comments
 (0)