Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
6479b821
Commit
6479b821
authored
Oct 05, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RSYNC variable to parallel-rsync-repos
parent
4dd7c2f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
bin/parallel-rsync-repos
bin/parallel-rsync-repos
+14
-1
No files found.
bin/parallel-rsync-repos
100644 → 100755
View file @
6479b821
...
...
@@ -4,6 +4,15 @@
# Example invocation:
# find /var/opt/gitlab/git-data/repositories -maxdepth 2 | \
# parallel-rsync-repos /var/opt/gitlab/git-data/repositories /mnt/gitlab/repositories
#
# You can also rsync to a remote destination.
#
# parallel-rsync-repos /var/opt/gitlab/git-data/repositories user@host:/mnt/gitlab/repositories
#
# If you need to pass extra options to rsync, set the RSYNC variable
#
# env RSYNC='rsync --rsh="foo bar"' parallel-rsync-repos /src dest
#
SRC
=
$1
DEST
=
$2
...
...
@@ -17,10 +26,14 @@ if [ -z "$SRC" ] || [ -z "$DEST" ] ; then
exit
1
fi
if
[
-z
"
$RSYNC
"
]
;
then
RSYNC
=
rsync
fi
if
!
cd
$SRC
;
then
echo
"cd
$SRC
failed"
exit
1
fi
sed
"s|
$SRC
|./|"
|
\
parallel
-j
$JOBS
--progress
"mkdir -p
$DEST
/{} &&
rsync
--delete -a {}/.
$DEST
/{}/"
parallel
-j
$JOBS
--progress
"mkdir -p
$DEST
/{} &&
$RSYNC
--delete -a {}/.
$DEST
/{}/"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment