Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lxdist-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
linuxsupport
lxdist-build
Commits
22f7f776
Commit
22f7f776
authored
5 years ago
by
Daniel Abad
Browse files
Options
Downloads
Patches
Plain Diff
WIP [
LOS-535
] do not merge here
parent
3edca1e7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lxsoftbin/new-lxsoft-sync-afs
+5
-78
5 additions, 78 deletions
lxsoftbin/new-lxsoft-sync-afs
lxsoftbin/new-lxsoft-sync-fedora
+3
-8
3 additions, 8 deletions
lxsoftbin/new-lxsoft-sync-fedora
lxsoftbin/new-lxsoft-sync-scientific
+10
-76
10 additions, 76 deletions
lxsoftbin/new-lxsoft-sync-scientific
with
18 additions
and
162 deletions
lxsoftbin/new-lxsoft-sync-afs
+
5
−
78
View file @
22f7f776
#!/bin/bash
#
# lxsoft-sync-afs
#
# 3.3.2006 v0.1 - Jaroslaw.Polok@cern.ch
#
# $Id: lxsoft-sync-afs,v 1.9 2009/10/02 13:07:46 jarek Exp $
[[
$EUID
-eq
0
]]
&&
echo
"Do not run it as root. Exit!"
&&
exit
1
MASTER
=
lxsoftadm01.cern.ch
[
-f
/etc/lxsoft.conf
]
&&
.
/etc/lxsoft.conf
[
x
`
/bin/hostname
`
!=
x
$MASTER
]
&&
echo
"This host (
`
/bin/hostname
`
) is not MASTER (
$MASTER
). Exit."
&&
exit
0
SYNC
=
all
VERBOSE
=
0
CHECKSUM
=
0
NOACTION
=
0
RSYNC="/usr/bin/rsync"
RSYNC_OPTS=" -rlptD --safe-links --delay-updates --delete-after --max-delete=500 --timeout=300"
RSYNC_VERBOSE=" -v"
help
()
{
echo
"
`
basename
$0
`
[ -v ] [ -f ] [ -s ARG ]"
echo
" -c = enforce rsync checksums (slow!!)"
echo
" -v = more verbose sync"
echo
" -q = be quiet"
echo
" -n = noaction"
echo
" -s ARG , where ARG mirror, lcg, egee, wlcg, lemon"
#lemon, quattor, wlcg"
exit
0
}
while
getopts
":vqnchs:"
flag
do
[
"
$flag
"
==
"v"
]
&&
VERBOSE
=
1
[
"
$flag
"
==
"h"
]
&&
help
[
"
$flag
"
==
"s"
]
&&
SYNC
=
$OPTARG
[
"
$flag
"
==
"c"
]
&&
CHECKSUM
=
1
[
"
$flag
"
==
"n"
]
&&
NOACTION
=
1
[
"
$flag
"
==
"q"
]
&&
RSYNC_VERBOSE
=
""
done
RSYNC_OPTS="$RSYNC_OPTS $RSYNC_VERBOSE"
TOP_AFS="/afs/cern.ch/project/gd/wlcg-repo/";
TOP_LOCAL="/mnt/data1/dist/wlcg/";
RSYNC_OPTS="$RSYNC_OPTS --exclude private/";
[
"
$SYNC
"
==
"all"
]
&&
TODO
=
"mirror"
||
TODO
=
$SYNC
[
$VERBOSE
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
--progress"
[
$CHECKSUM
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
-c"
[
$NOACTION
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
-n"
for
COMP
in
${
TODO
}
;
do
RSYNC_OPTS_ORG
=
$RSYNC_OPTS
case
"
$COMP
"
in
"lcg"
)
TOP_AFS
=
"/afs/cern.ch/project/gd/www/gis/aptDB/"
;
TOP_LOCAL
=
"/mnt/data1/dist/LCG/aptDB/"
;;
"egee"
)
TOP_AFS
=
"/afs/cern.ch/project/egee/gLite/"
;
TOP_LOCAL
=
"/mnt/data1/dist/EGEE/gLite/"
;;
# "lemon") TOP_AFS="/afs/cern.ch/project/lemon/"; TOP_LOCAL="/mnt/data1/dist/lemon/" ;;
# "quattor") TOP_AFS="/afs/cern.ch/project/quattor/"; TOP_LOCAL="/mnt/data1/dist/quattor/" ;;
"wlcg"
)
TOP_AFS
=
"/afs/cern.ch/project/gd/wlcg-repo/"
;
TOP_LOCAL
=
"/mnt/data1/dist/wlcg/"
;
RSYNC_OPTS
=
"
$RSYNC_OPTS
--exclude private/"
;;
*
)
echo
"Error: unknown comp to sync"
;
exit
1
;;
esac
if
[
"
$RSYNC_VERBOSE
"
!=
""
]
;
then
echo
"Starting
`
basename
$0
`
at
`
date
`
for
$COMP
"
fi
echo
"Running:
$RSYNC
$TOP_AFS
$TOP_LOCAL
$RSYNC_OPTS
"
$RSYNC
$TOP_AFS
$TOP_LOCAL
$RSYNC_OPTS
RSYNC_OPTS
=
$RSYNC_OPTS_ORG
done
if
[
"
$RSYNC_VERBOSE
"
!=
""
]
;
then
echo
"Finished
`
basename
$0
`
at
`
date
`
."
fi
$RSYNC $TOP_AFS $TOP_LOCAL $RSYNC_OPTS
This diff is collapsed.
Click to expand it.
lxsoftbin/new-lxsoft-sync-fedora
+
3
−
8
View file @
22f7f776
...
...
@@ -5,14 +5,9 @@ VERBOSE=0
CHECKSUM
=
0
NOACTION
=
0
MASTER
=
lxsoftadm01.cern.ch
[
-f
/etc/lxsoft.conf
]
&&
.
/etc/lxsoft.conf
[
x
`
/bin/hostname
`
!=
x
$MASTER
]
&&
echo
"This host (
`
/bin/hostname
`
) is not MASTER (
$MASTER
). Exit."
&&
exit
0
MIRROR
=
"rsync://ftp.fau.de/fedora/linux"
#MIRROR="rsync://fedora.mirrors.ovh.net/download.fedora.redhat.com/linux"
#MIRROR="rsync://mirrors.ircam.fr/fedora-linux/"
MIRROR
=
"rsync://mirror.in2p3.fr/pub/fedora/linux/"
RSYNC
=
"/usr/bin/rsync"
RSYNC_OPTS
=
" -H -rlptD --safe-links --delay-updates --delete-after --max-delete=10000 --timeout=3600 --exclude=.*rpm.?* --exclude=.~tmp~"
RSYNC_VERBOSE
=
" -v"
...
...
This diff is collapsed.
Click to expand it.
lxsoftbin/new-lxsoft-sync-scientific
+
10
−
76
View file @
22f7f776
#!/bin/bash
#
# lxarchive-sync-scientific
#
# Jaroslaw.Polok@cern.ch
MASTER
=
lxsoftadm01.cern.ch
[
-f
/etc/lxsoft.conf
]
&&
.
/etc/lxsoft.conf
[
x
`
/bin/hostname
`
!=
x
$MASTER
]
&&
echo
"This host (
`
/bin/hostname
`
) is not MASTER (
$MASTER
). Exit."
&&
exit
0
MIRRORSL
=
"rsync.scientificlinux.org::scientific"
SYNC
=
all
VERBOSE
=
0
CHECKSUM
=
0
NOACTION
=
0
RSYNC="/usr/bin/rsync"
# exclude "hidden" rpm files - typicall other (upstream) rsync in progress..
RSYNC_OPTS
=
" -H -rlptD --safe-links --delay-updates --delete-after --max-delete=5000 --timeout=6000 --exclude=.*rpm.?*"
RSYNC_VERBOSE
=
" -v"
help
()
{
echo
"
`
basename
$0
`
[ -c ] [ -v ] [ -q ] [ -n ] [ -f ] [ -s ARG ]"
echo
" -c = enforce rsync checksums (VERY slow!!)"
echo
" -v = more verbose sync"
echo
" -q = be quiet"
echo
" -n = noaction"
echo
" -s ARG , where ARG scientific"
exit
0
}
while
getopts
":vqnchas:"
flag
do
[
"
$flag
"
==
"v"
]
&&
VERBOSE
=
1
[
"
$flag
"
==
"h"
]
&&
help
[
"
$flag
"
==
"s"
]
&&
SYNC
=
$OPTARG
[
"
$flag
"
==
"c"
]
&&
CHECKSUM
=
1
[
"
$flag
"
==
"n"
]
&&
NOACTION
=
1
[
"
$flag
"
==
"q"
]
&&
RSYNC_VERBOSE
=
""
done
RSYNC_OPTS
=
"
$RSYNC_OPTS
$RSYNC_VERBOSE
"
[
"
$SYNC
"
==
"all"
]
&&
TODO
=
"scientific"
||
TODO
=
$SYNC
[
$VERBOSE
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
--progress"
[
$CHECKSUM
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
-c"
[
$NOACTION
-eq
1
]
&&
RSYNC_OPTS
=
"
$RSYNC_OPTS
-n"
for
COMP
in
${
TODO
}
;
do
RSYNC_OPTS_ORG
=
$RSYNC_OPTS
case
"
$COMP
"
in
"scientific"
)
TOP_REMOTE
=
$MIRRORSL
;
TOP_LOCAL
=
"/mnt/data1/dist/scientific"
;
RSYNC_OPTS
=
"
$RSYNC_OPTS
--exclude=obsolete/"
;;
*
)
echo
"Error: unknown comp to sync"
;
exit
1
;;
esac
# exclude "hidden" rpm files - typical other (upstream) rsync in progress..
#-c = enforce rsync checksums (VERY slow!!)"
RSYNC_OPTS=" -H -rlptD --safe-links --delay-updates --delete-after --max-delete=5000 --timeout=6000 --exclude=.*rpm.?*"
RSYNC_OPTS="$RSYNC_OPTS -v --progress -c -n"
RSYNC_OPTS="$RSYNC_OPTS --exclude=obsolete/"
if
[
"
$RSYNC_VERBOSE
"
!=
""
]
;
then
echo
"Starting
`
basename
$0
`
at
`
date
`
for
$COMP
"
echo
"Running:
$RSYNC
$TOP_REMOTE
/
$TOP_LOCAL
/
$RSYNC_OPTS
"
fi
eval
$RSYNC
$TOP_REMOTE
/
$TOP_LOCAL
/
$RSYNC_OPTS
ret
=
$?
[
"
$ret
"
-eq
0
]
||
echo
"last
$RSYNC
returned an error:
$ret
"
if
[
"
$RSYNC_VERBOSE
"
!=
""
]
;
then
echo
"Finished
`
basename
$0
`
at
`
date
`
."
fi
TOP_REMOTE="rsync.scientificlinux.org::scientific"
TOP_LOCAL="/mnt/data1/dist/scientific";
RSYNC_OPTS
=
$RSYNC_OPTS
_ORG
eval $RSYNC $TOP_REMOTE/ $TOP_LOCAL/
$RSYNC_OPTS
done
ret=$?
[ "$ret" -eq 0 ] || echo "last $RSYNC returned an error: $ret"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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