Backup Project
The project backup task has a limited scope: tables (dictionary and data export), views (either as a logical table or as an exported table), resources, files and report templates. Other project elements that are not part of the backup: user and group permissions, view change history, table analysis, report executions etc.
opal backup-project <CREDENTIALS> [OPTIONS] [XTRAS]
Options
Option |
Description |
---|---|
|
Source project name |
|
Archive directory path in the Opal file system |
|
Treat views as tables, i.e. export data instead of keeping derivation scripts (default is false) |
|
Force overwriting an existing backup folder |
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
Backup a specific project from a project, wait for the task to complete and download the archive as an encrypted zip file:
opal backup-project --opal https://opal-demo.obiba.org --user administrator --password password --project CNSIM --archive /home/administrator/backup/CNSIM | opal task --opal https://opal-demo.obiba.org --user administrator --password password --wait && opal file --download --opal https://opal-demo.obiba.org --user administrator --password password --download-password foobar123 /home/administrator/backup/CNSIM > CNSIM.zip