Rucio CLI¶
usage: rucio [-h] [--version] [--verbose] [-H ADDRESS] [--auth-host ADDRESS]
[-a ACCOUNT] [-S AUTH_STRATEGY] [-T TIMEOUT] [--robot]
[--user-agent USER_AGENT] [-u USERNAME] [-pwd PASSWORD]
[--certificate CERTIFICATE] [--ca-certificate CA_CERTIFICATE]
{ping,whoami,list-file-replicas,list-dataset-replicas,add-dataset,add-container,attach,detach,ls,list-dids,list-parent-dids,list-parent-datasets,list-scopes,close,reopen,stat,erase,list-files,list-content,list-content-history,upload,get,download,get-metadata,set-metadata,list-rse-usage,list-account-usage,list-account-limits,add-rule,delete-rule,rule-info,list-rules,list-rules-history,update-rule,move-rule,list-rses,list-rse-attributes,list-datasets-rse,test-server,touch}
...
Named Arguments¶
--version | show program’s version number and exit |
--verbose, -v | Print more verbose output. Default: False |
-H, --host | The Rucio API host. |
--auth-host | The Rucio Authentication host. |
-a, --account | Rucio account to use. |
-S, --auth-strategy | |
Authentication strategy (userpass, x509…) | |
-T, --timeout | Set all timeout values to seconds. |
--robot, -R | All output in bytes and without the units. This output format is preferred by parsers and scripts. Default: True |
--user-agent, -U | |
Rucio User Agent Default: “rucio-clients” | |
-u, --user | username |
-pwd, --password | |
password | |
--certificate | Client certificate file. |
--ca-certificate | |
CA certificate to verify peer against (SSL). |
Sub-commands:¶
list-file-replicas¶
This method allows to list all the replicas of a given Data IDentifier (DID). The only mandatory parameter is the DID which can be a container/dataset/files. By default all the files replicas in state available are returned.
rucio list-file-replicas [-h] [--protocols PROTOCOLS] [--all-states] [--pfns]
[--domain DOMAIN] [--link LINK] [--rse SELECTED_RSE]
[--missing] [--metalink] [--sort SORT]
[--expression RSE_EXPRESSION]
dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--protocols | List of comma separated protocols. (i.e. https, root, srm). |
--all-states | To select all replicas (including unavailable ones). Default: False |
--pfns | Show only the PFNs. Default: False |
--domain | Force the networking domain. Available options: wan, lan, all. |
--link | Symlink PFNs with directory substitution. |
--rse | Show only results for this RSE. Default: False |
--missing | To list missing replicas at a RSE. Must be used with –rse option Default: False |
--metalink | Output available replicas as metalink. Default: False |
--sort | Replica sort algorithm. Available options: random (default), geoip |
--expression | The RSE filter expression. A comprehensive help about RSE expressions can be found in [1mhttp://rucio.cern.ch/client_tutorial.html#adding-rules-for-replication[0m |
list-dataset-replicas¶
List the dataset replicas.
rucio list-dataset-replicas [-h] [--deep] [--csv] did
Positional Arguments¶
did | The name of the DID to search. |
Named Arguments¶
--deep | Make a deep check. Default: False |
--csv | Comma Separated Value output. Default: False |
add-dataset¶
Add a dataset to Rucio Catalog.
rucio add-dataset [-h] [--monotonic] [--lifetime LIFETIME] did
Positional Arguments¶
did | The name of the dataset to add. |
Named Arguments¶
--monotonic | Monotonic status to True. Default: False |
--lifetime | Lifetime in seconds. |
add-container¶
Add a container to Rucio Catalog.
rucio add-container [-h] [--monotonic] [--lifetime LIFETIME] did
Positional Arguments¶
did | The name of the container to add. |
Named Arguments¶
--monotonic | Monotonic status to True. Default: False |
--lifetime | Lifetime in seconds. |
attach¶
Attach a list of Data IDentifiers (file, dataset or container) to an other Data IDentifier (dataset or container).
rucio attach [-h] [-f] todid dids [dids ...]
Positional Arguments¶
todid | Destination Data IDentifier (either dataset or container). |
dids | List of space separated data identifiers (or a file containing one did per line, if -f is present). |
Named Arguments¶
-f, --from-file | |
Attach the DIDs contained in a file. The file should contain one did per line. Default: False |
detach¶
Detach a list of Data Identifiers (file, dataset or container) from an other Data Identifier (dataset or container).
rucio detach [-h] fromdid dids [dids ...]
Positional Arguments¶
fromdid | Target Data IDentifier (must be a dataset or container). |
dids | List of space separated data identifiers. |
ls¶
List the Data IDentifiers matching certain pattern.Only the collections (i.e. dataset or container) are returned by default. With the filter option, you can specify a list of metadata that the Data IDentifier should match.
rucio ls [-h] [-r] [--filter FILTER] [--short] did
Positional Arguments¶
did | Data IDentifier pattern. |
Named Arguments¶
-r, --recursive | |
List data identifiers recursively. Default: False | |
--filter | Filter arguments in form key=value,another_key=next_value. Valid keys are name, type. |
--short | Just dump the list of DIDs. Default: False |
list-dids¶
List the Data IDentifiers matching certain pattern. Only the collections (i.e. dataset or container) are returned by default. With the filter option, you can specify a list of metadata that the Data IDentifier should match.
rucio list-dids [-h] [--recursive] [--filter FILTER] [--short] did
Positional Arguments¶
did | Data IDentifier pattern |
Named Arguments¶
--recursive | List data identifiers recursively. Default: False |
--filter | Filter arguments in form key=value,another_key=next_value. Valid keys are name, type. |
--short | Just dump the list of DIDs. Default: False |
list-parent-dids¶
List all parents Data IDentifier that contains the target Data IDentifier.
rucio list-parent-dids [-h] [--pfn PFNS [PFNS ...]] [--guid GUIDS [GUIDS ...]]
[did]
Positional Arguments¶
did | Data identifier. |
Named Arguments¶
--pfn | List parent dids for these pfns. |
--guid | List parent dids for these guids. |
list-parent-datasets¶
List all parents Data IDentifier that contains the target Data IDentifier.
rucio list-parent-datasets [-h] [--pfn PFNS [PFNS ...]]
[--guid GUIDS [GUIDS ...]]
[did]
Positional Arguments¶
did | Data identifier. |
Named Arguments¶
--pfn | List parent dids for these pfns. |
--guid | List parent dids for these guids. |
close¶
Close a dataset or container.
rucio close [-h] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
reopen¶
Reopen a dataset or container (only for privileged users).
rucio reopen [-h] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
stat¶
List attributes and statuses about data identifiers.
rucio stat [-h] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
erase¶
This command sets the lifetime of the DID in order to expire in the next 24 hours. After this time, the dataset is eligible for deletion. The deletion is not reversible after 24 hours grace time period expired.
rucio erase [-h] [--undo] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--undo | Undo erase DIDs. Only works if has been less than 24 hours since erase operation. Default: False |
list-files¶
List all the files in a Data IDentifier. The DID can be a container, dataset or a file. What is returned is a list of files in the DID with : <scope>:<name> <filesize> <checksum> <guid>
rucio list-files [-h] [--csv] [--pfc LOCALPATH] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--csv | Comma Separated Value output. This output format is preferred for easy parsing and scripting. Default: False |
--pfc | Outputs the list of files in the dataset with the LOCALPATH prepended as a PoolFileCatalog Default: False |
list-content¶
List the content of a collection.
rucio list-content [-h] [--short] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--short | Just dump the list of DIDs. Default: False |
list-content-history¶
List the content history of a collection.
rucio list-content-history [-h] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
upload¶
Upload method.
rucio upload [-h] --rse RSE [--lifetime LIFETIME] [--scope SCOPE] [--summary]
[--guid GUID] [--protocol PROTOCOL] [--pfn PFN] [--name NAME]
args [args ...]
Positional Arguments¶
args | files and datasets. |
Named Arguments¶
--rse | Rucio Storage Element (RSE) name. |
--lifetime | Lifetime of the rule in seconds. |
--scope | Scope name. |
--summary | Create rucio_upload.json summary file Default: False |
--guid | Manually specify the GUID for the file. |
--protocol | Force the protocol to use |
--pfn | Specify the exact PFN for the upload. |
--name | Specify the exact LFN for the upload. |
get¶
Download method (synonym for download)
rucio get [-h] [--dir DIR] [--rse RSE] [--protocol PROTOCOL]
[--nrandom NRANDOM] [--ndownloader NDOWNLOADER] [--no-subdir]
[--pfn PFN] [--aria]
dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--dir | The directory to store the downloaded file. Default: “.” |
--rse | RSE Expression to specify allowed sources. |
--protocol | Force the protocol to use. |
--nrandom | Download N random files from the DID. |
--ndownloader | Choose the number of parallel processes for download. Default: 3 |
--no-subdir | Don’t create a subdirectory for the scope of the files. Existing files in the directory will be overwritten. Default: False |
--pfn | Specify the exact PFN for the download. |
--aria | Use aria2c utility if possible. (EXPERIMENTAL) Default: False |
download¶
Download method (synonym for get)
rucio download [-h] [--dir DIR] [--rse RSE] [--protocol PROTOCOL]
[--nrandom NRANDOM] [--ndownloader NDOWNLOADER] [--no-subdir]
[--pfn PFN] [--aria]
dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
Named Arguments¶
--dir | The directory to store the downloaded file. Default: “.” |
--rse | RSE Expression to specify allowed sources |
--protocol | Force the protocol to use. |
--nrandom | Download N random files from the DID. |
--ndownloader | Choose the number of parallel processes for download. Default: 3 |
--no-subdir | Don’t create a subdirectory for the scope of the files. Existing files in the directory will be overwritten. Default: False |
--pfn | Specify the exact PFN for the download. |
--aria | Use aria2c utility if possible. (EXPERIMENTAL) Default: False |
get-metadata¶
Get metadata for DIDs.
rucio get-metadata [-h] dids [dids ...]
Positional Arguments¶
dids | List of space separated data identifiers. |
set-metadata¶
set-metadata method
rucio set-metadata [-h] --did DID --key KEY --value VALUE
Named Arguments¶
--did | Data identifier to add |
--key | Attribute key |
--value | Attribute value |
list-rse-usage¶
Shows the total/free/used space for a given RSE. This values can differ for different RSE source.
rucio list-rse-usage [-h] [--history HISTORY] rse
Positional Arguments¶
rse | Rucio Storage Element (RSE) name. |
Named Arguments¶
--history | List RSE usage history. [Unimplemented] Default: False |
list-account-usage¶
Shows the space used, the quota limit and the quota left for an account for every RSE where the user have quota.
rucio list-account-usage [-h] [--rse RSE] usage_account
Positional Arguments¶
usage_account | Account name. |
Named Arguments¶
--rse | Show usage for only for this RSE. |
list-account-limits¶
List quota limits for an account in every RSEs.
rucio list-account-limits [-h] [--rse RSE] limit_account
Positional Arguments¶
limit_account | The account name. |
Named Arguments¶
--rse | If this option is given, the results are restricted to only this RSE. |
add-rule¶
Add replication rule.
rucio add-rule [-h] [--weight WEIGHT] [--lifetime LIFETIME]
[--grouping {DATASET,ALL,NONE}] [--locked]
[--source-replica-expression SOURCE_REPLICA_EXPRESSION]
[--notify NOTIFY] [--activity ACTIVITY] [--comment COMMENT]
[--ask-approval] [--asynchronous] [--account RULE_ACCOUNT]
[--skip-duplicates]
dids [dids ...] copies rse_expression
Positional Arguments¶
dids | DID(s) to apply the rule to |
copies | Number of copies |
rse_expression | RSE Expression |
Named Arguments¶
--weight | RSE Weight |
--lifetime | Rule lifetime (in seconds) |
--grouping | Possible choices: DATASET, ALL, NONE Rule grouping |
--locked | Rule locking Default: False |
--source-replica-expression | |
Source Replica Expression | |
--notify | Notification strategy : Y (Yes), N (No), C (Close) |
--activity | Activity to be used (e.g. User, Data Consolidation |
--comment | Comment about the replication rule |
--ask-approval | Ask for rule approval Default: False |
--asynchronous | Create rule asynchronously Default: False |
--account | The account owning the rule |
--skip-duplicates | |
Skip duplicate rules Default: False |
delete-rule¶
Delete replication rule.
rucio delete-rule [-h] [--purge-replicas] [--all]
[--rse_expression RSE_EXPRESSION] [--account RULE_ACCOUNT]
rule_id
Positional Arguments¶
rule_id | Rule id or DID. If DID, the RSE expression is mandatory. |
Named Arguments¶
--purge-replicas | |
Purge rule replicas Default: False | |
--all | Delete all the rules, even the ones that are not owned by the account Default: False |
--rse_expression | |
The RSE expression. Must be specified if a DID is provided. | |
--account | The account of the rule that must be deleted |
rule-info¶
Retrieve information about a rule.
rucio rule-info [-h] [--examine] [--estimate-ttc] rule_id
Positional Arguments¶
rule_id | The rule ID |
Named Arguments¶
--examine | Detailed analysis of transfer errors Default: False |
--estimate-ttc | Show Estimated Time To Complete for the rule. Calculation can be time consuming. Default: False |
list-rules¶
List replication rules.
rucio list-rules [-h] [--id RULE_ID] [--traverse] [--csv] [--file FILE]
[--account RULE_ACCOUNT]
[--subscription ACCOUNT SUBSCRIPTION]
[did]
Positional Arguments¶
did | List by did |
Named Arguments¶
--id | List by rule id |
--traverse | Traverse the did tree and search for rules affecting this did Default: False |
--csv | Comma Separated Value output Default: False |
--file | List associated rules of an affected file |
--account | List by account |
--subscription | List by account and subscription name |
list-rules-history¶
List replication rules history for a DID.
rucio list-rules-history [-h] did
Positional Arguments¶
did | The Data IDentifier. |
update-rule¶
Update replication rule.
rucio update-rule [-h] [--lifetime LIFETIME] [--locked LOCKED]
[--account RULE_ACCOUNT] [--stuck] [--suspend]
[--activity RULE_ACTIVITY]
[--source-replica-expression SOURCE_REPLICA_EXPRESSION]
[--cancel-requests] [--priority PRIORITY]
[--child-rule-id CHILD_RULE_ID]
rule_id
Positional Arguments¶
rule_id | Rule id |
Named Arguments¶
--lifetime | Lifetime in seconds. |
--locked | Locked (True/False). |
--account | Account to change. |
--stuck | Set state to STUCK. Default: False |
--suspend | Set state to SUSPENDED. Default: False |
--activity | Activity of the rule. |
--source-replica-expression | |
Source replica expression of the rule. | |
--cancel-requests | |
Cancel requests when setting rules to stuck. Default: False | |
--priority | Priority of the requests of the rule. |
--child-rule-id | |
Child rule id of the rule. |
move-rule¶
Move a replication rule to another RSE.
rucio move-rule [-h] rule_id rse_expression
Positional Arguments¶
rule_id | Rule id |
rse_expression | RSE expression of new rule |
list-rses¶
Show the list of all the registered Rucio Storage Elements (RSEs).
rucio list-rses [-h] [--expression RSE_EXPRESSION]
Named Arguments¶
--expression | The RSE filter expression. A comprehensive help about RSE expressions can be found in [1mhttp://rucio.cern.ch/client_tutorial.html#adding-rules-for-replication[0m |
list-rse-attributes¶
This command is useful to create RSE filter expressions.
rucio list-rse-attributes [-h] rse
Positional Arguments¶
rse | The RSE name |
list-datasets-rse¶
This method allows to list all the datasets on a given Rucio Storage Element. [1mWarning: [0mThis command can take a long time depending on the number of datasets in the RSE.
rucio list-datasets-rse [-h] [--long] rse
Positional Arguments¶
rse | The RSE name |
Named Arguments¶
--long | The long option Default: False |