File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed
share/github-backup-utils Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ export CALLING_SCRIPT="ghe-backup"
47
47
# Setup progress tracking
48
48
init-progress
49
49
export PROGRESS_TYPE=" Backup"
50
- echo $PROGRESS_TYPE > /tmp/track -progress-type
50
+ echo $PROGRESS_TYPE > /tmp/backup-utils -progress-type
51
51
export PROGRESS=0 # Used to track progress of backup
52
- echo $PROGRESS > /tmp/track -progress
52
+ echo $PROGRESS > /tmp/backup-utils -progress
53
53
export PROGRESS_TOTAL=18 # Maximum number of steps in backup
54
54
55
55
# Check to make sure moreutils parallel is installed and working properly
Original file line number Diff line number Diff line change @@ -30,26 +30,26 @@ while true; do
30
30
done
31
31
32
32
check_for_progress_file () {
33
- if [ ! -f /tmp/progress-info ]; then
33
+ if [ ! -f /tmp/backup-utils- progress-info ]; then
34
34
echo " No progress file found. has a backup or restore been started?"
35
35
exit 1
36
36
fi
37
37
}
38
38
39
39
if [ -n " $ONCE " ]; then
40
40
check_for_progress_file
41
- cat /tmp/progress-info
41
+ cat /tmp/backup-utils- progress-info
42
42
else
43
43
check_for_progress_file
44
44
clear
45
- cat /tmp/progress-info
45
+ cat /tmp/backup-utils- progress-info
46
46
while true ; do
47
47
if read -r -t 1 -n 1; then
48
48
clear
49
49
exit ;
50
50
else
51
51
clear
52
- cat /tmp/progress-info
52
+ cat /tmp/backup-utils- progress-info
53
53
fi
54
54
done
55
55
fi
Original file line number Diff line number Diff line change @@ -308,9 +308,9 @@ export PROGRESS_TOTAL=$((OPTIONAL_STEPS + 5))
308
308
309
309
init-progress
310
310
export PROGRESS_TYPE=" Restore"
311
- echo $PROGRESS_TYPE > /tmp/track -progress-type
311
+ echo $PROGRESS_TYPE > /tmp/backup-utils -progress-type
312
312
export PROGRESS=0 # Used to track progress of restore
313
- echo $PROGRESS > /tmp/track -progress
313
+ echo $PROGRESS > /tmp/backup-utils -progress
314
314
315
315
# Log restore start message locally and in /var/log/syslog on remote instance
316
316
START_TIME=$( date +%s)
Original file line number Diff line number Diff line change 55
55
PATH=" $GHE_BACKUP_ROOT /bin:$GHE_BACKUP_ROOT /share/github-backup-utils:$PATH "
56
56
# shellcheck source=share/github-backup-utils/bm.sh
57
57
. " $GHE_BACKUP_ROOT /share/github-backup-utils/bm.sh"
58
- . " $GHE_BACKUP_ROOT /share/github-backup-utils/track -progress"
58
+ . " $GHE_BACKUP_ROOT /share/github-backup-utils/backup-utils -progress"
59
59
# Save off GHE_HOSTNAME from the environment since we want it to override the
60
60
# backup.config value when set.
61
61
GHE_HOSTNAME_PRESERVE=" $GHE_HOSTNAME "
@@ -648,7 +648,7 @@ restore-secret() {
648
648
649
649
# initialize progress tracking by clearing out the temp files used to track
650
650
init-progress () {
651
- rm -f /tmp/track -progress-*
651
+ rm -f /tmp/backup-utils -progress-*
652
652
}
653
653
654
654
Original file line number Diff line number Diff line change 4
4
# Current version is working solely with backups
5
5
progress (){
6
6
7
- PROGRESS=$( cat /tmp/track -progress)
8
- PROGRESS_TYPE=$( cat /tmp/track -progress-type)
7
+ PROGRESS=$( cat /tmp/backup-utils -progress)
8
+ PROGRESS_TYPE=$( cat /tmp/backup-utils -progress-type)
9
9
PROGRESS_PERCENT=$( echo " scale = 2; ($PROGRESS / $PROGRESS_TOTAL ) * 100" | bc)
10
- echo $(( PROGRESS + 1 )) > /tmp/track -progress
11
- echo " ${PROGRESS_TYPE} progress: $PROGRESS_PERCENT % ($PROGRESS / $PROGRESS_TOTAL ) $1 " > /tmp/progress-info
10
+ echo $(( PROGRESS + 1 )) > /tmp/backup-utils -progress
11
+ echo " ${PROGRESS_TYPE} progress: $PROGRESS_PERCENT % ($PROGRESS / $PROGRESS_TOTAL ) $1 " > /tmp/backup-utils- progress-info
12
12
}
You can’t perform that action at this time.
0 commit comments