File tree Expand file tree Collapse file tree 3 files changed +51
-6
lines changed
share/github-backup-utils Expand file tree Collapse file tree 3 files changed +51
-6
lines changed Original file line number Diff line number Diff line change 505
505
cmd_title=$( log_info " Restoring Redis database ..." )
506
506
commands=("
507
507
echo \" $cmd_title \"
508
- bm_start \" $( basename $0 ) - Restoring Redis\"
509
- ghe-ssh \" $GHE_HOSTNAME \" -- 'ghe-import-redis' < \" $GHE_RESTORE_SNAPSHOT_PATH /redis.rdb\" 1>&3
510
- bm_end \" $( basename $0 ) - Restoring Redis\" " )
508
+ ghe-restore-redis \" $GHE_HOSTNAME \" )
511
509
512
510
cmd_title=$( log_info " Restoring Git Repositories ..." )
513
511
commands+=("
@@ -527,9 +525,7 @@ ghe-restore-pages \"$GHE_HOSTNAME\" 1>&3")
527
525
cmd_title=$( log_info " Restoring SSH authorized keys ..." )
528
526
commands+=("
529
527
echo \" $cmd_title \"
530
- bm_start \" $( basename $0 ) -Restoring SSH authorized keys\"
531
- ghe-ssh \" $GHE_HOSTNAME \" -- 'ghe-import-authorized-keys' < \" $GHE_RESTORE_SNAPSHOT_PATH /authorized-keys.json\" 1>&3
532
- bm_end \" $( basename $0 ) -Restoring SSH authorized keys\" " )
528
+ ghe-restore-ssh-keys \" $GHE_HOSTNAME \" \" $GHE_RESTORE_SNAPSHOT_PATH \" )
533
529
534
530
cmd_title=$( log_info " Restoring storage data ..." )
535
531
commands+=("
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # / Usage: ghe-restore-redis <host>
3
+ # / Restore redis files from an rsync snapshot.
4
+ # /
5
+ # / Note: This script typically isn't called directly. It's invoked by the
6
+ # / ghe-restore command.
7
+ set -e
8
+
9
+ # Bring in the backup configuration
10
+ # shellcheck source=share/github-backup-utils/ghe-backup-config
11
+ . " $( dirname " ${BASH_SOURCE[0]} " ) /ghe-backup-config"
12
+
13
+ # Show usage and bail with no arguments
14
+ [[ -z ${* } ]] && print_usage
15
+
16
+ # Grab host arg
17
+ GHE_HOSTNAME=" ${1} "
18
+
19
+ bm_start " $( basename " ${0} " ) "
20
+
21
+ ghe-ssh " $GHE_HOSTNAME " -- ' ghe-import-redis' < " $GHE_RESTORE_SNAPSHOT_PATH /redis.rdb" 1>&3
22
+
23
+ bm_end " $( basename " ${0} " ) "
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # / Usage: ghe-restore-ssh-keys <host>
3
+ # / Restore ssh keys from an rsync snapshot.
4
+ # /
5
+ # / Note: This script typically isn't called directly. It's invoked by the
6
+ # / ghe-restore command.
7
+ set -e
8
+
9
+ # Bring in the backup configuration
10
+ # shellcheck source=share/github-backup-utils/ghe-backup-config
11
+ . " $( dirname " ${BASH_SOURCE[0]} " ) /ghe-backup-config"
12
+
13
+ # Show usage and bail with no arguments
14
+ [[ -z ${* } ]] && print_usage
15
+
16
+ bm_start " $( basename " ${0} " ) "
17
+
18
+ # Grab host arg
19
+ GHE_HOSTNAME=" ${1} "
20
+ GHE_RESTORE_SNAPSHOT_PATH=" ${2} "
21
+
22
+ bm_start " $( basename " ${0} " ) "
23
+
24
+ ghe-ssh " $GHE_HOSTNAME " -- ' ghe-import-authorized-keys' < " $GHE_RESTORE_SNAPSHOT_PATH /authorized-keys.json" 1>&3
25
+
26
+ bm_end " $( basename " ${0} " ) "
You can’t perform that action at this time.
0 commit comments