Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rdms:access:linux:icommands [2024/08/19 08:39] – fixed typo: Metda --> Meta giuliordms:access:linux:icommands [2025/05/28 10:07] (current) – [Configure iCommands] Small fix: Missing " jelte
Line 23: Line 23:
 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",
Line 40: Line 40:
     "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>\\
Line 232: Line 250:
 For the explanation of commonly used ''iCommands'', we will split the ''iCommands'' into three different sections: For the explanation of commonly used ''iCommands'', we will split the ''iCommands'' into three different sections:
  
-  - **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 (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 (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. 
Line 467: Line 485:
   * 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>
Line 672: Line 690:
 </code> </code>
 </hidden>\\ </hidden>\\
 +
 +**How to manage files in the RDMS trash folder**\\
 +Files that have been deleted either via the web interface or using  the command ''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 you wish to restore files in the ''trash'' folder using ''iCommands'', you can do so by running the following commands:
 +<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.