File size: 734 Bytes
1d7245f
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

NPROCS=$1
MIRRORDIR=pdb                # your top level rsync directory
RSYNC=rsync                             # location of local rsync

SERVER=rsync.wwpdb.org::ftp                                   # RCSB PDB server name
PORT=33444                                                    # port RCSB PDB server is using

# get file list, remove first and last 3 lines from output (double-check that these lines are not needed)
${RSYNC} -lpt -v -z --delete --port=$PORT --no-h --list-only ${SERVER}/data/structures/divided/pdb/ | cut -c 44- | head -n -3 | tail -n +3 > dirlist.txt

cat dirlist.txt | xargs -n1 -P${NPROCS} -I% rsync -rlpt -v -z --port=$PORT -P ${SERVER}/data/structures/divided/pdb/% $MIRRORDIR
rm dirlist.txt