Downloading Files

Last update: 23 Aug 2024 [History] [Edit]

One of the primary uses of rucio is to download user and production files.

tip Do not download the full dataset, it is over 2.2 TB!!! The command below is an example of how to download a full dataset, but it should be used with caution. Always make sure you know the size of a dataset before downloading it in its entirety. Note that __NODOWNLOAD__ has been added to the command to prevent any costly accidents.

To download a complete dataset, use a command such as:

rucio download "data23_13p6TeV:__NODOWNLOAD__data23_13p6TeV.00450445.physics_Main.merge.AOD.f1342_m2167"

Very often, it doesn’t make sense to download the entire dataset, especially if it is large. Instead, it might be better to only download a small number (e.g., 1) of the files in a dataset. To do this, you would add the --nrandom argument to specify the number of randomly selected files to download:

rucio download --nrandom 1 "data23_13p6TeV:data23_13p6TeV.00450445.physics_Main.merge.AOD.f1342_m2167"

Because everything that rucio knows about is a DID it is just as easy to download a specific file, using the scope:name syntax, e.g.,:

rucio download "data23_13p6TeV:data23_13p6TeV.00450445.physics_Main.merge.AOD.f1342_m2167._lb0110._0001.1"

Exercise

Try to download 1 randomly selected file from a mc16 ttbar dataset.

tip Remember the --nrandom 1 option. Please do not download the whole dataset.