Skip to content
Karl Ehatäht edited this page Jul 8, 2022 · 11 revisions

Documentation available at: https://twiki.cern.ch/twiki/bin/viewauth/CMS/Rucio

(Apparently, /cvmfs/cms.cern.ch/rucio/setup-py3.sh should be sourced after source /cvmfs/cms.cern.ch/cmsset_default.sh. Never run cmsenv, though, as it seems to pollute the environment variables that python needs.)

Add this to your $HOME/.bashrc:

export RUCIO_ACCOUNT=yourcmsusername
#alias rucio='rucio --ca-certificate /home/$USER/.globus/usercert.pem' # NOT A GOOD IDEA ANYMORE

The first line makes it easier to perform rucio calls that use this environment variable, such as

rucio list-rules --account $RUCIO_ACCOUNT

As for the second line in the .bashrc, apparently rucio requires to specify the certificate in each and every call, but it defaults to a path that we don't normally have write access to. Thus, it's easier to override the default path to the certificate by creating an alias accordingly.

Make sure that your grid proxy is always open when working with rucio:

source /cvmfs/grid.cern.ch/umd-c7ui-latest/etc/profile.d/setup-c7-ui-example.sh
voms-proxy-init -voms cms
# voms-proxy-destroy # once you're done

If you want to copy over a bunch of datasets that are listed in, say, datasets.txt, and you don't have a quota set up (hence the --ask-approval):

rucio add-rule --ask-approval $(cat datasets.txt | sed 's/^/cms:/g' | tr '\n' ' ') 1 T2_EE_Estonia

If you already a quota set up for you and the rule to copy over the samples is below the quota threshold, then you don't need to include --ask-approval to your command:

rucio add-rule $(cat datasets.txt | sed 's/^/cms:/g' | tr '\n' ' ') 1 T2_EE_Estonia

The input file (datasets.txt) should include the DBS names of each sample, one per line. It is also possible to create rules for individual lines, in which case there should be one LFN (logical file name) per line that starts with /store/mc (or with /store/data if you want to copy individual data files).

You can follow the progress of your data transfer rules and check the status of our tier from this link:
https://cms-rucio-webui.cern.ch/

Clone this wiki locally