Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
ec500536
Commit
ec500536
authored
12 years ago
by
Andy Yates
Browse files
Options
Downloads
Patches
Plain Diff
added udr as an option. udr is a faster rsync
parent
bc1829a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc-scripts/CopyDBoverServer.pl
+33
-3
33 additions, 3 deletions
misc-scripts/CopyDBoverServer.pl
with
33 additions
and
3 deletions
misc-scripts/CopyDBoverServer.pl
+
33
−
3
View file @
ec500536
...
...
@@ -25,6 +25,7 @@ Usage:
$0 --pass=XXX \\
\t[--noflush] [--nocheck] [--notargetflush]\\
\t[--noopt] [--noinnodb] [--skip_views] [--force] \\
\t[--udr] \\
\t[ --only_tables=XXX,YYY | --skip_tables=XXX,YYY ] \\
\t[ input_file |
\t --source=db\@host[:port] \\
...
...
@@ -116,6 +117,15 @@ Command line switches:
create a directory called 'tmp' in the directory
above the target data directory.
--udr (Optional)
Switches to using UDR (https://github.com/LabAdvComp/UDR)
as the transport binary rather than rsync. UDR is an rsync
compatible replacement over UDP whose speed on local
networks is approx. twice that of plain rsync.
udr must be on your PATH on the target source and target
machine.
--help (Optional)
Displays this text.
...
...
@@ -195,6 +205,7 @@ my $opt_force = 0; # Do not reuse existing staging directory by default.
my
$opt_skip_views
=
0
;
# Process views by default
my
$opt_innodb
=
1
;
# Don't skip InnoDB by default
my
$opt_flushtarget
=
1
;
my
$opt_udr
=
0
;
#Do not use udr for file transfer
my
$opt_tmpdir
;
my
(
$opt_source
,
$opt_target
);
...
...
@@ -211,7 +222,8 @@ if ( !GetOptions( 'pass=s' => \$opt_password,
'
tmpdir=s
'
=>
\
$opt_tmpdir
,
'
help!
'
=>
\
$opt_help
,
'
source=s
'
=>
\
$opt_source
,
'
target=s
'
=>
\
$opt_target
'
target=s
'
=>
\
$opt_target
,
'
udr
'
=>
\
$opt_udr
,
)
||
(
!
defined
(
$opt_password
)
&&
!
defined
(
$opt_help
)
)
)
{
...
...
@@ -266,6 +278,7 @@ if ( !defined($opt_source) ) {
my
%executables
=
(
'
myisamchk
'
=>
'
/usr/local/ensembl/mysql/bin/myisamchk
',
'
rsync
'
=>
'
/usr/bin/rsync
'
);
$executables
{
udr
}
=
'
/usr/bin/udr
'
if
$opt_udr
;
# Make sure we can find all executables.
foreach
my
$key
(
keys
(
%executables
)
)
{
...
...
@@ -286,6 +299,16 @@ foreach my $key ( keys(%executables) ) {
else
{
my
$final_which_output
=
`
which
$key
`;
my
$final_rc
=
$?
>>
8
;
if
(
$final_rc
==
0
)
{
chomp
$final_which_output
;
$executables
{
$key
}
=
$final_which_output
;
printf
(
"
Can not find '%s'; using '%s'
\n
",
$exe
,
$executables
{
$key
}
);
}
else
{
if
(
!
$opt_check
&&
$key
eq
'
myisamchk
'
)
{
print
(
"
Can not find 'myisamchk'
"
.
"
but --nocheck was specified so skipping
\n
"
),;
...
...
@@ -298,6 +321,7 @@ foreach my $key ( keys(%executables) ) {
$exe
,
$key
,
$key
)
);
}
}
}
}
## end if ( $rc != 0 )
...
...
@@ -700,8 +724,14 @@ TABLE:
# copy too, and because it has good inclusion/exclusion filter
# options.
my
@copy_cmd
=
(
$executables
{'
rsync
'},
'
--whole-file
',
'
--archive
',
'
--progress
'
);
my
@copy_cmd
;
if
(
$opt_udr
)
{
@copy_cmd
=
(
$executables
{'
udr
'},
'
rsync
');
}
else
{
@copy_cmd
=
(
$executables
{'
rsync
'});
}
push
(
@copy_cmd
,
'
--whole-file
',
'
--archive
',
'
--progress
'
);
if
(
$opt_force
)
{
push
(
@copy_cmd
,
'
--delete
',
'
--delete-excluded
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment