Both sides previous revision Previous revision Next revision | Previous revision |
rdms:access:linux:icommands [2024/05/06 09:50] – [Installation on Ubuntu and Debian] Styling jelte | rdms:access:linux:icommands [2025/04/09 07:31] (current) – added info on metadata giulio |
---|
2. Create the configuration file: | 2. Create the configuration file: |
| |
Create the file ''~/.irods/irods_environment.json'' using your preferred text editor. The file must contain plain ASCII characters. Add the following lines to the file, modifying as instructed below: | Create the file ''~/.irods/irods_environment.json'' using your preferred text editor. The file must contain plain ASCII characters. [[https://wiki.hpc.rug.nl/rdms/solution/multizone|The Default and Sensitive data (SD) zones]] have different configurations. Add the following lines to the file, modifying as instructed below: |
| |
<hidden Click to display configuration file><code> | <hidden Click to display configuration file for Default zone><code> |
{ | { |
"irods_authentication_scheme": "PAM", | "irods_authentication_scheme": "pam_password", |
"irods_client_server_negotiation": "request_server_negotiation", | "irods_client_server_negotiation": "request_server_negotiation", |
"irods_client_server_policy": "CS_NEG_REQUIRE", | "irods_client_server_policy": "CS_NEG_REQUIRE", |
"irods_user_name": "<emailadress>", | "irods_user_name": "<emailadress>", |
"irods_zone_name": "rug" | "irods_zone_name": "rug" |
| } |
| </code></hidden>\\ |
| |
| <hidden Click to display configuration file for Sensitive data zone><code> |
| { |
| "irods_authentication_scheme": "pam_password", |
| "irods_client_server_negotiation": "request_server_negotiation", |
| "irods_client_server_policy": "CS_NEG_REQUIRE", |
| "irods_default_resource": "rootResc", |
| "irods_encryption_algorithm": "AES-256-CBC", |
| "irods_encryption_key_size": 32, |
| "irods_encryption_num_hash_rounds": 16, |
| "irods_encryption_salt_size": 8, |
| "irods_host": "store-sd.data.rug.nl", |
| "irods_port": 1247, |
| "irods_ssl_verify_server": "cert", |
| "irods_user_name": "<emailadress>, |
| "irods_zone_name": "sdrugZone" |
} | } |
</code></hidden>\\ | </code></hidden>\\ |
</code> | </code> |
| |
As of now, the warning can be still ignored and the steps can be performed as described, but in the longer term it is highly advisable to add the repository signing key in another manner as described, for example, [[https://www.linuxuprising.com/2021/01/apt-key-is-deprecated-how-to-add.html|here]]. As of now, iRODS has not yet decided on the best way to handle this in the case of the iRODS package repository. this information will be updated accordingly. | As of now, the warning can be still ignored and the steps can be performed as described, but in the longer term it is highly advisable to add the repository signing key in another manner as described, for example, [[https://www.linuxuprising.com/2021/01/apt-key-is-deprecated-how-to-add.html|here]]. As of now, iRODS has not yet decided on the best way to handle this in the case of the iRODS package repository, and this information will be updated accordingly in the future. |
| |
==== Installation on EL-based Distributions ==== | ==== Installation on EL-based Distributions ==== |
| |
- **iCommands for Navigation** will describe the iCommands that are used to navigate the RDMS from the CLI, but also contain information about starting/ending of the connection. | - **iCommands for Navigation** will describe the iCommands that are used to navigate the RDMS from the CLI, but also contain information about starting/ending of the connection. |
- **iCommands for (Metda)data Management** will describe how to transfer data in/out of the RDMS, explain how to set permissions for other users, how to work with metadata from the CLI, including a more detailed description on how to query the database for more extensive searches. | - **iCommands for (Meta)data Management** will describe how to transfer data in/out of the RDMS, explain how to set permissions for other users, how to work with metadata from the CLI, including a more detailed description on how to query the database for more extensive searches. |
- **iCommands for Group Management** will focus on the respective commands that can be used by 'groupadmins' to manage RDMS groups from the CLI. As this section is not relevant for all users, it will be discussed separately. | - **iCommands for Group Management** will focus on the respective commands that can be used by 'groupadmins' to manage RDMS groups from the CLI. As this section is not relevant for all users, it will be discussed separately. |
| |
</hidden> | </hidden> |
| |
=== iCommands for (Metda)data Management === | === iCommands for (Meta)data Management === |
**Upload to the RDMS**\\ | **Upload to the RDMS**\\ |
To transfer data to the the RDMS, the ''iput'' command can be used. It is of the general syntax ''iput [flags] <source> <dest>'' where ''<source>'' points to files/folders on your local environment while ''<dest>'' specifies the destination on the RDMS. The destination entry can be also left empty in which case the data will be transferred to the current RDMS working directory. Specified paths can be relative or absolute. | To transfer data to the the RDMS, the ''iput'' command can be used. It is of the general syntax ''iput [flags] <source> <dest>'' where ''<source>'' points to files/folders on your local environment while ''<dest>'' specifies the destination on the RDMS. The destination entry can be also left empty in which case the data will be transferred to the current RDMS working directory. Specified paths can be relative or absolute. |
* To see detailed information about the progress of the synchronization, the additional ''-v'' (verbose) flag can be used. | * To see detailed information about the progress of the synchronization, the additional ''-v'' (verbose) flag can be used. |
* The ''-K'' flag can be used to calculate and compare checksum for the transferred files on the source and destination side. This is recommended. | * The ''-K'' flag can be used to calculate and compare checksum for the transferred files on the source and destination side. This is recommended. |
* The ''irsync'' command does not have a specific force flag to overwrite files. Instead, ''irsync'' works in a way that it detects new/changed files on the specified source and uploads them to the target destination. Already existing files that were not changed are not touch/transferred by ''irsync'' while changed files get overwritten on the destination! | * The ''irsync'' command does not have a specific force flag to overwrite files. Instead, ''irsync'' works in a way that it detects new/changed files on the specified source and uploads them to the target destination. Already existing files that were not changed are not touched/transferred by ''irsync'' while changed files get overwritten on the destination! |
| |
With this notes in mind, a typical ''irsync'' command with recommend flags would look like: | With this note in mind, a typical ''irsync'' command with recommend flags would look like: |
| |
<hidden> | <hidden> |
</code> | </code> |
</hidden>\\ | </hidden>\\ |
| |
| **How to manage files in the RDMS trash folder**\\ |
| Files that have been deleted either from the web interface or using ''irm'' are not permanently removed from the system, but are stored in the ''trash'' folder of the RDMS. Should you wish to empty your ''trash'' folder, you can simply run the ''irmtrash'' command without any further parameter. |
| |
| If instead you wish to restore files in the ''trash'' folder, you can do so by running these lines in iCommands: |
| <hidden> |
| <code> |
| #To locate a file in the trash folder, you will need to know the filename: |
| $ ilocate -t <filename> |
| |
| # where the -t switch indicates to search in trash. Copy the path given by ilocate, then run any of the suggested commands. |
| |
| # To move the file out of the trash folder (and preserve previously attached metadata): |
| $ imv <logical path(s) from ilocate> <path to RDMS destination folder> |
| |
| # To restore a copy of the file present in the trash folder (without previously attached metadata): |
| $ icp <logical path(s) from ilocate> <path to RDMS destination folder> |
| |
| # To download a copy of the file to a folder on your local system (without previously attached metadata): |
| $ iget <logical path(s) from ilocate> <path to local destination folder> |
| |
| </code> |
| </hidden>\\ |
| |
| You can also use the **RDMS web interface to restore a file** from the ''trash''. If you would prefer to use the web interface for this operation, please refer to the section of the wiki [[https://wiki.hpc.rug.nl/rdms/webapp/databrowser#how_to_restore_deleted_files|How to restore deleted files]]. |
| |
**Working with Metadata**\\ | **Working with Metadata**\\ |
The ''iCommands'' can be also used to add metadata to a file/folder, list already existing metadata, modify existing metadata, and also query (search) for objects that contain certain metadata. | The ''iCommands'' can be also used to add metadata to a file/folder, list already existing metadata, modify existing metadata, and also query (search) for objects that contain certain metadata. |