Database archive service
IBM User Data Services (UDS) allows for archiving the database on demand. To set up the command-line interface (CLI) and perform database archive, follow these steps.
Using the Dockerized client
To download the data exchange Docker image from Docker hub, use the following command:
docker pull icr.io/ibm-uds/dataexchange-cli:2.0.8
Prerequisites
-
Obtain the authentication token from your OpenShift console.
-
Navigate to User Management > Service Accounts > user-data-services-operator.
-
Click
user-data-services-operator
. -
Scroll down to the Secrets section and select the secret named user-data-services-operator-token-XXXXX.
-
Copy the value from the token. Place it in a separate file on your machine with the name
token
.
For OpenShift Container Platform 4.8, follow these steps:
- Navigate to Workloads > Pods.
- Under Pods, select the
data-exchange-service-deployment
pod. - Click Terminal.
- Execute
cat /var/run/secrets/kubernetes.io/serviceaccount/token
. - Copy the token displayed on terminal output. Place it in a separate file on your machine with the name
token
. - Place the
config.yaml
and service account token files in a folder. - Update the
config.yaml
file as shown.
Note that the token path must have the prefix /usr/local/app/
.
address: hostname_of_service:port_of_service
insecure: false
token-path: /usr/local/app/token
Commands
Following are the commands provided by the command-line tool.
Creating UDS archive zip
docker run -v "<drive_name>:<folder_created_on_host_machine>/":/usr/local/app icr.io/ibm-uds/dataexchange-cli:2.0.8 dbarchiver create --from-date 2020-01-01 --to-date 2021-01-01 --config usr/local/app/config.yaml --verbose
Creating submodule archive zip
docker run -v "<drive_name>:<folder_created_on_host_machine>/":/usr/local/app icr.io/ibm-uds/dataexchange-cli:2.0.8 dbarchiver create --archive-type DPCM --from-date 2020-01-01 --to-date 2021-01-01 --config usr/local/app/config.yaml --verbose
Listing archived files
docker run -v "<drive_name>:<folder_created_on_host_machine>/":/usr/local/app icr.io/ibm-uds/dataexchange-cli:2.0.8 dbarchiver list --config usr/local/app/config.yaml
See the following example:
docker run -v "D:/Airgap/":/usr/local/app icr.io/ibm-uds/dataexchange-cli:2.0.8 dbarchiver list --config usr/local/app/config.yaml
Downloading archived file
docker run -v "<drive_name>:<folder_created_on_host_machine>/":/usr/local/app icr.io/ibm-uds/dataexchange-cli:2.0.8 dbarchiver download -f filename.zip -d path to save zip file --file-name <filename_with_extension> -o usr/local/app/ --config usr/local/app/config.yaml