File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
share/github-backup-utils Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,8 @@ if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
113
113
exit 0
114
114
fi
115
115
116
+ storage_user=$( ghe-ssh " $GHE_HOSTNAME " -- stat -c %U /data/user/storage || echo git)
117
+
116
118
# rsync all the storage objects
117
119
bm_start " $( basename $0 ) - Storage object sync"
118
120
for file_list in $tempdir /* .rsync; do
@@ -124,7 +126,7 @@ for file_list in $tempdir/*.rsync; do
124
126
ghe-rsync -avr \
125
127
-e " ssh -q $opts -p $port $ssh_config_file_opt -l $user " \
126
128
$link_dest " $@ " \
127
- --rsync-path=' sudo -u git rsync' \
129
+ --rsync-path=" sudo -u $storage_user rsync" \
128
130
--files-from=" $file_list " \
129
131
--ignore-missing-args \
130
132
--size-only \
Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ if ! ls $tempdir/*.rsync >/dev/null 2>&1; then
119
119
exit 0
120
120
fi
121
121
122
+ storage_user=$( ghe-ssh " $GHE_HOSTNAME " -- stat -c %U /data/user/storage || echo git)
123
+
122
124
# rsync all the objects to the storage server where they belong.
123
125
# One rsync invocation per server available.
124
126
bm_start " $( basename $0 ) - Restoring objects"
@@ -131,7 +133,7 @@ for file_list in $tempdir/*.rsync; do
131
133
ghe_verbose " * Transferring data to $server ..."
132
134
ghe-rsync -arvHR --delete \
133
135
-e " ssh -q $opts -p $port $ssh_config_file_opt -l $user " \
134
- --rsync-path=" sudo -u git rsync" \
136
+ --rsync-path=" sudo -u $storage_user rsync" \
135
137
--files-from=$file_list \
136
138
--size-only \
137
139
" $GHE_DATA_DIR /$GHE_RESTORE_SNAPSHOT /storage/./" \
You can’t perform that action at this time.
0 commit comments