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.10

Prerequisites

  1. Obtain the authentication token from your OpenShift console.

  2. Navigate to User Management > Service Accounts > user-data-services-operator.

  3. Click user-data-services-operator.

  4. Scroll down to the Secrets section and select the secret named user-data-services-operator-token-XXXXX.

  5. 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:

  1. Navigate to Workloads > Pods.
  2. Under Pods, select the data-exchange-service-deployment pod.
  3. Click Terminal.
  4. Execute cat /var/run/secrets/kubernetes.io/serviceaccount/token.
  5. Copy the token displayed on terminal output. Place it in a separate file on your machine with the name token.
  6. Place the config.yaml and service account token files in a folder.
  7. 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.10  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.10  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.10  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.10  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.10 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