File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed
share/github-backup-utils Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change 147147rsync_repository_data () {
148148 port=$( ssh_port_part " $1 " )
149149 host=$( ssh_host_part " $1 " )
150- file_list=" $2 "
151- shift
152- shift
153- ghe-rsync -avr \
154- -e " ssh -q $opts -p $port -F $config_file -l $user " \
155- $link_dest " $@ " \
156- --rsync-path=' sudo -u git rsync' \
157- --include-from=- --exclude=\* \
158- --files-from=" $file_list " \
159- " $host :$GHE_REMOTE_DATA_USER_DIR /repositories/" \
160- " $backup_dir " 1>&3
150+
151+ # check if we are syncing from a given file list
152+ if [[ " $2 " == * " .rsync" ]]; then
153+ files_list=" $2 "
154+ shift
155+ shift
156+ ghe-rsync -avr \
157+ -e " ssh -q $opts -p $port -F $config_file -l $user " \
158+ $link_dest " $@ " \
159+ --rsync-path=' sudo -u git rsync' \
160+ --include-from=- --exclude=\* \
161+ --files-from=" $files_list " \
162+ " $host :$GHE_REMOTE_DATA_USER_DIR /repositories/" \
163+ " $backup_dir " 1>&3
164+ else
165+ shift
166+ ghe-rsync -avr \
167+ -e " ssh -q $opts -p $port -F $config_file -l $user " \
168+ $link_dest " $@ " \
169+ --rsync-path=' sudo -u git rsync' \
170+ --include-from=- --exclude=\* \
171+ " $host :$GHE_REMOTE_DATA_USER_DIR /repositories/" \
172+ " $backup_dir " 1>&3
173+ fi
174+
161175}
162176
163177sync_data (){
You can’t perform that action at this time.
0 commit comments