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
a1098db4
Commit
a1098db4
authored
8 years ago
by
Thomas Maurel
Browse files
Options
Downloads
Patches
Plain Diff
Updated script to work on both the EBI and Sanger MySQL servers
parent
c4639594
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
+13
-10
13 additions, 10 deletions
misc-scripts/CopyDBoverServer.pl
with
13 additions
and
10 deletions
misc-scripts/CopyDBoverServer.pl
+
13
−
10
View file @
a1098db4
...
...
@@ -294,8 +294,8 @@ if ( defined($opt_skip_tables) ) {
%skip_tables
=
map
(
{
$_
=>
1
}
split
(
/,/
,
$opt_skip_tables
)
);
}
if
(
scalar
(
getpwuid
(
$<
)
)
ne
'
mysqlens
'
)
{
warn
("
You are not running this script as the 'mysqlens'
us
er.
\n
");
if
(
scalar
(
getpwuid
(
$<
)
)
ne
'
ensmysql
'
and
scalar
(
getpwuid
(
$<
)
)
ne
'
mysqlens
'
)
{
warn
("
You are not running this script as the
'ensmysql' user at the EBI or as the
'mysqlens'
at Sang
er.
\n
");
}
if
(
!
defined
(
$opt_user
))
...
...
@@ -321,7 +321,11 @@ foreach my $key (@executables) {
my
$output
=
`
which
$key
`;
my
$rc
=
$?
>>
8
;
if
(
$rc
!=
0
)
{
if
(
!
$opt_check
&&
$key
eq
'
myisamchk
'
)
{
print
(
"
Can not find 'myisamchk'
"
.
"
but --nocheck was specified so skipping
\n
"
),;
}
elsif
(
$rc
!=
0
)
{
chomp
$output
;
die
(
sprintf
(
...
...
@@ -330,12 +334,6 @@ foreach my $key (@executables) {
$key
,
$key
)
);
}
else
{
if
(
!
$opt_check
&&
$key
eq
'
myisamchk
'
)
{
print
(
"
Can not find 'myisamchk'
"
.
"
but --nocheck was specified so skipping
\n
"
),;
}
}
}
## end foreach my $key ( @executables...)
my
$run_hostaddr
=
hostname_to_ip
(
hostname
());
...
...
@@ -603,7 +601,12 @@ foreach my $spec (@todo) {
my
$tmp_dir
;
if
(
defined
(
$opt_tmpdir
)
)
{
$tmp_dir
=
$opt_tmpdir
}
else
{
$tmp_dir
=
canonpath
(
catdir
(
$target_dir
,
updir
(),
'
tmp
'
)
);
if
((
scalar
(
getpwuid
(
$<
)
)
eq
'
mysqlens
'))
{
$tmp_dir
=
canonpath
(
catdir
(
$target_dir
,
updir
(),
'
tmp
'
));
}
elsif
((
scalar
(
getpwuid
(
$<
)
)
eq
'
ensmysql
')){
$tmp_dir
=
canonpath
(
catdir
(
$target_dir
,
updir
(),
'
temp
'
));
}
}
printf
(
"
SOURCE 'datadir' = '%s'
\n
",
$source_dir
);
...
...
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