#! /bin/sh # the Perdigao root at NEWA storage perdigao=/newa/WP2/PERDIGAO # the archive root archive=$perdigao/archive # the actual size of the archive echo "Total du of $archive:" du -ks $archive # the UDA readonly password export RSYNC_PASSWORD=-password- # catalogues to sync CATALOGS="dlr inegi ucar windfors" for c in $CATALOGS; do # mirror catalog from the version at UDA (UPORTO) echo; echo "$(tr [a-z] [A-Z] <<< "$c"):" #cmd="rsync -avz uda@windsptds.fe.up.pt::archive/$c/ $archive/$c/" cmd="rsync -avz --delete uda@windsptds.fe.up.pt::archive/$c/ $archive/$c/" echo "$cmd..." # do it $cmd done # catalog structure echo tree -L 2 $archive # total space usage for each archive echo du -khs $archive/* # the final size of the archive echo echo "Total du of $archive:" du -ks $archive # the end echo echo "Done."