Created
September 3, 2013 17:09
-
-
Save jctoledo/6426686 to your computer and use it in GitHub Desktop.
PDB FTP RSYNC mirroring script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################################################################ | |
# | |
# Script for mirroring PDB FTP archive using rsync | |
# | |
############################################################################ | |
# This script is being provided to PDB users as a template for using rsync | |
# to mirror the FTP archive from an anonymous rsync server. You may want | |
# to review rsync documentation for options that better suit your needs. | |
# | |
# Author: Thomas Solomon | |
# Date: November 1, 2002 | |
# Last Updated on: Nov 25 2008 | |
############################################################################ | |
# You should CHANGE THE NEXT THREE LINES to suit your local setup | |
############################################################################ | |
MIRRORDIR=/media/twotb/pdb/xml # your top level rsync directory | |
LOGFILE=/media/twotb/pdb/logs/xml.log # file for storing logs | |
RSYNC=/usr/bin/rsync # location of local rsync | |
# You should NOT CHANGE THE NEXT TWO LINES | |
SERVER=rsync.wwpdb.org # remote server name | |
PORT=33444 # port remote server is using | |
${RSYNC} -rlpt -v -z --delete --port=$PORT $SERVER::ftp_data/structures/divided/XML/ $MIRRORDIR > $LOGFILE 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment