File
Manage files in the Opal file system.
opal file <PATH> <CREDENTIALS> [OPTIONS] [EXTRAS]
Arguments
Argument |
Description |
---|---|
|
The path of the file in the Opal file system |
Options
Option |
Description |
---|---|
|
Download a file or a folder (as a zip file) |
|
Password to encrypt the file content (8 characters minimum). |
|
Upload a local file to a folder in Opal file system |
|
Delete a file on Opal file system |
|
Skip confirmation |
Credentials
Authentication can be done by username/password credentials OR by personal access token OR by certificate/private key pair (two-way SSL authentication).
Option |
Description |
---|---|
|
Opal server base url |
|
Credentials auth: user name (requires a password) |
|
Credentials auth: user password (requires a user name) |
|
Token auth: user’s personal access token |
|
Two-way SSL auth: certificate/public key file (requires a private key) |
|
Two-way SSL auth: private key file (requires a certificate) |
Extras
Option |
Description |
---|---|
|
Show the command help’s message. |
|
Verbose output. |
|
Output pretty-print JSON |
Example
Upload a file to Opal file system:
opal file --opal https://opal-demo.obiba.org --user administrator --password password -up /path/to/local/file /home/administrator
Download a folder (encrypted zip file) from Opal file system:
opal file --opal https://opal-demo.obiba.org --user administrator --password password --download-password foobar123 /home/administrator/export/collected > collected.zip
Download a file from Opal file system:
opal file --opal https://opal-demo.obiba.org --user administrator --password password -dl /home/administrator/HOP-FNAC2.xml > HOP-FNAC2.xml
Delete a file from Opal file system:
opal file --opal https://opal-demo.obiba.org --user administrator --password password -dt /home/administrator/HOP-FNAC2.xml