Skip to content

Commit b0b5041

Browse files
committed
Merge pull request #90 from github/use-pipefail
report mysqldump failures
2 parents 5717ca3 + 2acbdfd commit b0b5041

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/ghe-backup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ ghe-ssh "$GHE_HOSTNAME" -- 'ghe-export-ssh-host-keys' > ssh-host-keys.tar ||
100100
failures="$failures ssh-host-keys"
101101

102102
echo "Backing up MySQL database ..."
103-
echo 'ghe-export-mysql | gzip' |
104-
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh > mysql.sql.gz ||
103+
echo 'set -o pipefail; ghe-export-mysql | gzip' |
104+
ghe-ssh "$GHE_HOSTNAME" -- /bin/bash > mysql.sql.gz ||
105105
failures="$failures mysql"
106106

107107
echo "Backing up Redis database ..."

share/github-backup-utils/ghe-ssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
#/ Usage: ghe-ssh [<option>...] <host> [<simple-command>...]
3-
#/ echo <complex-command>... | ghe-ssh [<option>...] <host> /bin/sh
3+
#/ echo 'set -o pipefail; <complex-command>...' | ghe-ssh [<option>...] <host> /bin/bash
44
#/ Helper to ssh into a GitHub instance with the right user and port. The first
55
#/ form should be used for simple commands; the second form should be used for
66
#/ complex commands that include pipelines or multiple commands.

0 commit comments

Comments
 (0)