We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 65c23c1 + f639ab7 commit 31605e0Copy full SHA for 31605e0
share/github-backup-utils/ghe-restore-mysql-audit-log
@@ -39,6 +39,11 @@ cleanup(){
39
ghe-ssh "$GHE_HOSTNAME" -- "sudo rm -rf $remote_dump"
40
}
41
42
+# Check whether the snapshot contains any MySQL data at all
43
+is_mysql_snapshot(){
44
+ test -d "$snapshot_dir"
45
+}
46
+
47
# Use ghe-export-audit-logs to fetch the current metadata for all stored
48
# months in MySQL. For each month: number of entries, minum ID, maximum ID
49
fetch_current_meta(){
@@ -204,6 +209,11 @@ restore(){
204
209
return
205
210
fi
206
211
212
+ if ! is_mysql_snapshot; then
213
+ ghe_verbose "snapshot doesn't contain MySQL data"
214
+ return
215
+ fi
216
207
217
restore_schema
208
218
if [ -n "$only_schema" ]; then
219
ghe_verbose "only table schema was imported"
0 commit comments