Both sides previous revision Previous revision Next revision | Previous revision |
rdms:access:linux:icommands [2024/08/19 08:39] – fixed typo: Metda --> Meta giulio | 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>\\ |
* 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. |