Skip to content

Commit f117cf2

Browse files
committed
refactor(remote-backup.sh): extract a command to a variable.
No functional changes.
1 parent 84d8b69 commit f117cf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vagrant/provisioning/roles/mystamps-backup/templates/remote-backup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ set -o errexit
66
UPLOADS_DST='{{ uploads_target_url }}'
77
MYSQL_BACKUPS_DST='{{ mysql_backups_target_url }}'
88
PASSPHRASE='{{ gpg_passphrase }}'
9+
DUPLICITY_CMD='duplicity --no-compression'
910

1011
case "${1:-}" in
1112
'uploads')
1213
su \
1314
mystamps \
14-
-c "duplicity --name=uploads --no-compression --no-encryption /data/uploads ${UPLOADS_DST}" \
15+
-c "${DUPLICITY_CMD} --name=uploads --no-encryption /data/uploads ${UPLOADS_DST}" \
1516
2>&1
1617
;;
1718
'mysql-backups')
1819
PASSPHRASE="$PASSPHRASE" su \
1920
mystamps \
20-
-c "duplicity --name=mysql-backups --no-compression /data/backups ${MYSQL_BACKUPS_DST}" \
21+
-c "${DUPLICITY_CMD} --name=mysql-backups /data/backups ${MYSQL_BACKUPS_DST}" \
2122
2>&1
2223
;;
2324
*)

0 commit comments

Comments
 (0)