User Tools

Site Tools


castor:transferzh

This is an old revision of the document!


Copying Files from CASTOR to Zuerich directly

How to

In order to copy files directly from CASTOR to a machine in Zurich, first do

export LHCBPRODROOT=/disk/dirac
. ${LHCBPRODROOT}/gLite/external/etc/profile.d/grid-env.sh
. ${LHCBPRODROOT}/lcg/etc/profile.d/grid_compat_env.sh
export X509_CERT_DIR=/disk/dirac/gLite/external/etc/grid-security/certificates
grid-proxy-init

which will prepare your machine for file-transport. Then do (e.g.):

lcg-cp -v 'srm://srm-lhcb.cern.ch:8443/srm/managerv2?SFN=/castor/cern.ch/user/myInitial/myUsername/myFile' file://home/hep/myUsername/myFile

The -v option just means verbose.

Note: You need a Grid Certificate to do this!

Transfer with a Script

In /home/hep/decianm/scripts you will find the script castortrans.sh. The best is to make an alias in your .zshrc-file like: alias castortrans=“source /home/hep/decianm/scripts/castortrans.sh” The script can be used the following way:

  • Open a new shell (it's always a good idea to open a new shell for transfers)
  • Type
castortrans -i

This will set up your Grid environment.

  • Type
 castortrans -f yourFileOnCastor -t yourDestinationFile

. If you have the same username at CERN as locally in Zurich, yourFileOnCastor will be the path starting in your home-directory on CASTOR. yourDestinationFile will start in your home-directory in Zurich. If your usernames are not identical in Zurich and at CERN, you have to set them manually in the script.

  • The script has been tested on a z-shell. As it is sourced and not only executed, it can not be guaranteed to work with all the other settings (hence the new shell).
castor/transferzh.1237544450.txt.gz · Last modified: 2009/03/20 11:20 by decianm