@@ -6,6 +6,12 @@ title: Using the Client
6
6
Rucio provides several commands for the end-user. See [ executables] ( bin/rucio.md ) .
7
7
The command line client is called `` rucio `` .
8
8
9
+ Please note that these commands are not meant to be included in python scripts.
10
+ For such applications, we encourage using the [ python client] ( pathname:///html/site/client.html ) .
11
+
12
+ If you are using a version of the client prior to ~ 36.0, please view the [ migration guide] ( user/migrating_from_35_client.md ) .
13
+
14
+ # Basic Commands
9
15
10
16
## Getting help
11
17
@@ -257,7 +263,7 @@ auth_token_file_path = /path/to/token/file
257
263
You can query the list of available RSEs:
258
264
259
265
` ` ` bash
260
- $ rucio list-rses
266
+ $ rucio rse list
261
267
SITE1_DISK
262
268
SITE1_TAPE
263
269
SITE2_DISK
@@ -269,7 +275,7 @@ If the RSEs are tagged with attributes you can build RSE expressions and query
269
275
the sites matching these expressions:
270
276
271
277
` ` ` bash
272
- $ rucio list-rses --rses " tier=1&disk=1"
278
+ $ rucio rse list --rses " tier=1&disk=1"
273
279
SITE1_DISK
274
280
SITE2_DISK
275
281
` ` `
@@ -279,7 +285,7 @@ SITE2_DISK
279
285
To list all the possible scopes:
280
286
281
287
` ` ` bash
282
- $ rucio list-scopes
288
+ $ rucio scope list
283
289
mc
284
290
data
285
291
user.jdoe
@@ -290,7 +296,7 @@ You can query the DIDs matching a certain pattern. It always requires to specify
290
296
the scope in which you want to search:
291
297
292
298
` ` ` bash
293
- $ rucio list-dids user.jdoe:*
299
+ $ rucio did list --did user.jdoe:*
294
300
+-------------------------------------------+--------------+
295
301
| SCOPE:NAME | [DID TYPE] |
296
302
| -------------------------------------------+--------------|
@@ -307,7 +313,7 @@ $ rucio list-dids user.jdoe:*
307
313
You can filter by key/value, e.g.:
308
314
309
315
` ` ` bash
310
- $ rucio list-dids --filter type=CONTAINER
316
+ $ rucio did list --filter type=CONTAINER --did user.jdoe: *
311
317
+-------------------------------------------+--------------+
312
318
| SCOPE:NAME | [DID TYPE] |
313
319
| -------------------------------------------+--------------|
@@ -320,7 +326,7 @@ If you want to resolve a collection (CONTAINER or DATASET) into the list of its
320
326
constituents:
321
327
322
328
` ` ` bash
323
- $ rucio list-content user.jdoe:user.jdoe.test.container.1234.1
329
+ $ rucio did content list --did user.jdoe:user.jdoe.test.container.1234.1
324
330
+------------------------------------+--------------+
325
331
| SCOPE:NAME | [DID TYPE] |
326
332
| ------------------------------------+--------------|
@@ -329,30 +335,15 @@ $ rucio list-content user.jdoe:user.jdoe.test.container.1234.1
329
335
+------------------------------------+--------------+
330
336
` ` `
331
337
332
- You can resolve also the collections (CONTAINER or DATASET) into the list of
333
- files:
334
-
335
- ` ` ` bash
336
- $ rucio list-files user.jdoe:user.jdoe.test.container.1234.1
337
- +-----------------------+---------+-------------+------------+----------+
338
- | SCOPE:NAME | GUID | ADLER32 | FILESIZE | EVENTS |
339
- | -----------------------+---------+-------------+------------+----------|
340
- | user.jdoe:test.file.1 | 9DF3... | ad:56fb0723 | 39.247 kB | |
341
- | user.jdoe:test.file.2 | 67E8... | ad:e3e573b5 | 636.075 kB | |
342
- | user.jdoe:test.file.3 | 32CD... | ad:22849380 | 641.427 kB | |
343
- +-----------------------+---------+-------------+------------+----------+
344
- Total files : 3
345
- Total size : 1.316 MB:
346
- ` ` `
347
-
348
338
# # Rules operations
349
339
350
340
You can create a new rule like this:
351
341
352
342
` ` ` bash
353
343
$ rucio add-rules --lifetime 1209600 \
354
- user.jdoe:user.jdoe.test.container.1234.1 1 \
355
- " tier=1&disk=1"
344
+ --did user.jdoe:user.jdoe.test.container.1234.1 \
345
+ --copies 1 \
346
+ --rses " tier=1&disk=1"
356
347
a12e5664555a4f12b3cc6991db5accf9
357
348
` ` `
358
349
@@ -361,7 +352,7 @@ The command returns the rule_id of the rule.
361
352
You can list the rules for a particular DID:
362
353
363
354
` ` ` bash
364
- $ rucio list-rules user.jdoe:user.jdoe.test.container.1234.1
355
+ $ rucio rule list --did user.jdoe:user.jdoe.test.container.1234.1
365
356
ID ACCOUNT SCOPE:NAME STATE[OK/REPL/STUCK] RSE_EXPRESSION COPIES EXPIRES
366
357
---- ------- ---------- -------------------- -------------- ------ -------
367
358
a... jdoe user.... OK[3/0/0] tier=1& disk=1 1 2018...
@@ -409,3 +400,117 @@ Downloaded files : 3
409
400
Files already found locally : 0
410
401
Files that cannot be downloaded : 0
411
402
` ` `
403
+
404
+ # Operator Commands
405
+
406
+ Rucio provides a CLI for administrative tasks. The get methods can be executed
407
+ by any user, but the set methods require some admin privileges.
408
+
409
+
410
+ # # Account and identity methods
411
+
412
+ To create a new account:
413
+
414
+ ` ` ` bash
415
+ $ rucio account add --type USER --email [email protected] jdoe
416
+ ` ` `
417
+
418
+ You can choose different types in the list USER, GROUP, SERVICE. Different
419
+ policies/permissions can be set depending on the account type. Once the account
420
+ is created, you need to create and attach an identity to this account:
421
+
422
+ ` ` ` bash
423
+ $ rucio account identity add --type X509 \
424
+ --id " CN=jdoe,OU=Users,OU=Organic Units,DC=blih,DC=blah" \
425
+
426
+ --account jdoe
427
+ ` ` `
428
+
429
+ The list of possible identity types is X509, GSS, USERPASS, SSH, SAML, OIDC:
430
+
431
+ ` ` ` bash
432
+ $ rucio account identity list --account jdoe
433
+ Identity: CN= jdoe,OU= Users,OU= Organic Units,DC= blih,DC= blah, type: X509
434
+ ` ` `
435
+
436
+ You can set attributes to the users:
437
+
438
+ ` ` ` bash
439
+ $ rucio account attribute add --key country --value xyz --account jdoe
440
+ ` ` `
441
+
442
+ And list these attributes:
443
+
444
+ ` ` ` bash
445
+ $ rucio-admin account attribute list --account jdoe
446
+ +---------+-------+
447
+ | Key | Value |
448
+ | ---------+-------|
449
+ | country | xyz |
450
+ +---------+-------+
451
+ ` ` `
452
+
453
+ You can also list all the accounts matching a certain attribute using the filter
454
+ option:
455
+
456
+ ` ` ` bash
457
+ $ rucio account list --filters " country=xyz"
458
+ jdoe
459
+ ` ` `
460
+
461
+ To add the quota for one account on a given RSE:
462
+
463
+ ` ` ` bash
464
+ $ rucio account limit add --account jdoe --rses SITE2_SCRATCH --bytes 10000000000000
465
+ Set account limit for account jdoe on RSE SITE2_SCRATCH: 10.000 TB
466
+
467
+ $ rucio account limit list --account jdoe --rses SITE2_SCRATCH
468
+ Quota on SITE2_SCRATCH for jdoe : 10 TB
469
+ ` ` `
470
+
471
+ # # Scope methods
472
+
473
+ To create a new scope:
474
+
475
+ ` ` ` bash
476
+ $ rucio scope add --account jdoe --scope user.jdoe
477
+ ` ` `
478
+
479
+ Only the owner of the scope or privileged users can write into the scope.
480
+
481
+ To list all the scopes:
482
+
483
+ ` ` ` bash
484
+ $ rucio scope list
485
+ user.janedoe
486
+ user.jdoe
487
+ ` ` `
488
+
489
+ # # RSE methods
490
+
491
+ To create a new RSE:
492
+
493
+ ` ` ` bash
494
+ $ rucio rse add --rse SITE2_SCRATCH
495
+ ` ` `
496
+
497
+ To add a RSE attribute:
498
+
499
+ ` ` ` bash
500
+ $ rucio rse attribute add --rse SITE2_SCRATCH --key country --value xyz
501
+ ` ` `
502
+
503
+ To check an RSE attribute:
504
+
505
+ ` ` ` bash
506
+ $ rucio rse attribute list --rse SITE2_SCRATCH
507
+ country: xyz
508
+ ` ` `
509
+
510
+ # # Replica methods
511
+
512
+ To declare bad (i.e. corrupted or lost replicas):
513
+
514
+ ` ` ` bash
515
+ $ rucio replica state update bad --reason " File corrupted" --files https//path/to/lost/file
516
+ ` ` `
0 commit comments