Upgrade instructions - OCI (4.2)

Backup the database by following these steps:

  1. List the databases and locate the one used for Usage Engine:

oci psql db-system-collection list-db-systems --compartment-id <compartment_OCID> --all
  1. Perform a backup of the database by running the following command:

oci psql backup create --compartment-id <compartment_OCID> --db-system-id <db_system_OCID> --display-name <backup_display_name>
  1. Check if the backup was created successfully by running this command:

oci psql backup-collection list-backups --compartment-id <compartment_OCID> --display-name <backup_display_name> --all
  1. Get details about a backup by running this command:

The next step is to do a backup of the file system used.

Note!

If there are standalone ECs that are still running and writing their logs to the same file system, events happening after the backup has been initiated will not be included in the backup.

After creation, snapshots are accessible under the root directory of the file system at .snapshot/<snapshot_name>.

 

Restore Database Backup

To restore the backup, run these commands:

Restore File System Snapshot

To restore a file system snapshot you need to access the snapshots via a Kubernetes Pod.

You must know the mount target IP address prior to mounting the file system onto the Pod. Before running the Pod, retrieve the mount target IP address from PV output:

Ensure to save the IP address as it will be used as input to mount the file system onto the Pod later.

To run a Kubernetes Pod, run this command:

You will see the command prompt if the Pod created and running. The command prompt indicates that you have logged in to the Pod successfully.

On the pod, download and install nfs-utils. These are libraries and executables needed to access the File System Storage.

On the pod, create the mount directory. This is the directory where the mounted file system is located.

On the pod, mount the file system with the mount target IP address that you retrieved and saved prior to running the pod.

On the pod, list the mount directory.

On the pod, list the available snapshots. These directories listed under .snapshot/ are the <snapshot_name> provided during backup of the file system in previous section.

To restore these snapshots within the Pod, copy these snapshots to the destination directory.

For example, to restore “snapshot-aug-3“ snapshot to platform volume mount directory, follow these steps:

  1. Clean up the existing platform volume mount directory.

  1. Copy data from “snapshot-aug-3“ to platform volume mount directory.

Note!

Always double check the file permission when you copy or move these snapshots. You want to preserve the file permission when you copy or move

  1. Unmount the file system if restore completed successfully.

  2. Exit the Pod

Â