Obtain the latest version of mirror from ftp://sunsite.org.uk/packages/mirror/mirror.tar.gz"
Create a subdirectory for mirror, cd into it and unpack the tar file:
mkdir /opt/mirror cd /opt/mirror tar -zxvf ..../mirror.tar.gz perl install.pl
export PERLLIB="/usr/local/lib/mirror"Alter the following in mirror.defaults
package=defaults
# The LOCAL hostname - if not the same as `hostname`
# (I advertise the name sunsite.org.uk but the machine is
# really swallow.sunsite.org.uk.)
hostname=sapc77.rdg.ac.uk
# Keep all local_dirs relative to here
local_dir=/data/
# The local_dir must exist FIRST
#local_dir_check=true
remote_password=a.c.r.martin@reading.ac.uk
#
# For Reading, we need to go via the FTP proxy server
#
proxy=true
proxy_gateway=ftpproxy.rdg.ac.uk
proxy_ftp_port=21
and place that file in /usr/local/lib/mirror
Create a subdirectory for the mirror packages:
mkdir /usr/local/lib/mirror/packagesand create the mirroring packages (each in a separate file with the package name):
File: enzyme
package=enzyme
comment=enzyme database from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/enzyme/
local_dir=/data/enzyme/
mail_to=sequence_users
File: genbank
package=genbank
comment=genbank database from NCBI - exclude ESTs, GSSs, HTSs
site=ftp.ncbi.nlm.nih.gov
remote_dir=genbank/
local_dir=/data/genbank/
exclude_patt=(^|/)(gbest|gbgss|gnhtg)
mail_to=sequence_users
File: imgt
package=imgt
comment=imgt database from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/imgt/
local_dir=/data/imgt/
mail_to=immunology_users
File: kabat
package=kabat
comment=Kabat database from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/kabat/fixlen/
local_dir=/data/kabat/
do_deletes=false
mail_to=immunology_users
File: p53
package=p53
comment=p53 database from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/p53/
local_dir=/data/p53/
do_deletes=false
mail_to=p53_users
File: pdb
package=pdb
comment=PDB from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/pdb/pub/pdb_data/all_entries/uncompressed_files/
local_dir=/data/pdb/
mail_to=pdb_users
package=pdb-obsolete
comment=PDB obsolete entries from EBI
site=ftp.ebi.ac.uk
remote_dir=pub/databases/pdb/pub/pdb_data/obsolete_entries/
local_dir=/data/pdb_obsolete/
mail_to=pdb_users
File: redhat
package=redhat
comment=Redhat from sunsite mirror
site=sunsite.org.uk
remote_dir=Mirrors/ftp.redhat.com/redhat/redhat-6.0/i386/
local_dir=/data/redhat/redhat-6.0/i386/
File: package=pdate
package=redhat_update
comment=Redhat updates from sunsite mirror
site=sunsite.org.uk
remote_dir=Mirrors/ftp.redhat.com/redhat/updates/6.0/
local_dir=/data/redhat/updates/6.0/
exclude_patt=(^|)(alpha)
File: swissprot
package=swissprot
comment=SwissProt from EBI: top level files
site=ftp.ebi.ac.uk
remote_dir=pub/databases/swissprot/
local_dir=/data/swissprot/
recursive=false
do_deletes=false
package=swissprot-release
comment=SwissProt from EBI: actual release
site=ftp.ebi.ac.uk
remote_dir=pub/databases/swissprot/release/
local_dir=/data/swissprot/release/
mail_to=sequence_users
package=swissprot-updates
comment=SwissProt from EBI: updates
site=ftp.ebi.ac.uk
remote_dir=pub/databases/swissprot/updates/
local_dir=/data/swissprot/updates/
mail_to=sequence_users
package=swissprot-old
comment=SwissProt from EBI: old versions
site=ftp.ebi.ac.uk
remote_dir=pub/databases/swissprot/sw_old_releases/
local_dir=/data/swissprot/sw_old_releases/
Create mail aliases in /etc/aliases (ammend as required):
sequence_users: andrew
pdb_users: andrew, E.G.Hutchinson@reading.ac.uk
p53_users: andrew
immunology_users: andrew
and run
newaliasesto update the sendmail alias database.
Create a cron job to run the mirror jobs. Create the file /etc/cron.daily/mirror.cron:
#!/bin/bash for pkg in /usr/local/lib/mirror/packages/* do mirror $pkg doneand make it executable:
chmod +x /etc/cron.daily/mirror.cron