Skip to content

Added initial version of dump-restore script.

Created by: ivanmrsulja

What's new?

This functionality was only available through UI in admin panel, now, it is available through .sh and .bat script so that it can be setup as cron job with minimal configuration.

How should this be tested?

If you are willing to use the script the server has to be running. The CLI arguments are as follows: bash dumpRestore.sh <action>

Action can be: dump or restore

For script to work, you have to configure parameters in setenv script. Because these parameters rarely change, I figured that someone can just edit few lines of the setenv script so that the command doesn't get cluttered with a lot of arguments:

models="CONTENT"                          # Models to be dumped/restored (CONTENT, CONFIGURATION etc...)
email="email@email.com"                   # Admin account email
password="password"                       # Admin account password

host="http://example:port"                # URL where the VIVO instance is hosted
purge="true"                              # Will the restoration process purge the models before restoring
restoration_files_path="."                # Directory containing the files used for restoration (restore files must be named as their corresponding models >> CONTENT.nq, CONFIGURATION.nq etc...)
dumped_files_path=$restoration_files_path # Directory containing the backed-up files
app_name="vivo"                           # app-name parameter

Interested parties

@chenejac @milospp

Merge request reports