Strategy One

Restore Environment Data in Existing Databases Using the Platform Analytics Data Restore Tool

Starting in Strategy One (May 2026), you can use the Platform Analytics Data Restore Tool to add new environment data (associated with a specific tenant_id) into an existing database. Use this tool to expand the existing database instance with new tenant information without removing the existing data.

Prerequisites

  • Backup your data and ensure your backup files are available in a known path.

  • You must have administrator privileges on the Linux/Windows host or kubectl access for containers.

  • The instance running the restore tool must have database access.

Linux-Based Instances

To add new tenant data to a Linux instance, execute the shell script located in the bin directory, replacing the flag values with your customization.

Command Location

Copy
/PlatformAnalytics/bin/platform-analytics-data-restore-tool.sh

Execution Syntax

Copy
./platform-analytics-data-restore-tool.sh -o false -b <absolute_backup_path> -t <tenant_id>

Argument Reference

Flag Parameter Required? Description
-o Overwrite Yes

Set this flag to false to ensure you add data rather than overwriting the conflicting rows in the existing database.

-b Backup Path Yes The absolute path to the directory that contains the backup files.
-t Tenant ID No The unique identifier for the tenant being added.

Windows-Based Instances

Windows uses the same logic as Linux using the .bat equivalent.

Command Location

Copy
PlatformAnalytics\bin\platform-analytics-data-restore-tool.bat

Verify your specific installation drive path. This path may vary.

Execution

Use the following command, replacing the flag values with your customization:

Copy
platform-analytics-data-restore-tool.bat -o false -b <absolute_backup_path> -t <tenant_id>

Argument Reference

Flag Parameter Required? Description
-o Overwrite Yes

Set this flag to false to add new data to the existing database.

-b Backup Path Yes The absolute path to the directory contains the backup files.
-t Tenant ID No The unique identifier for the tenant being added.

Container-Based Environments

If you are using a containerized environment, restoration is triggered by modifying the Deployment configuration. Add the following environment variables to trigger a pod restart, which initiates the restore path.

Procedure

  1. Edit the deployment using kubectl:

    Copy
    kubectl edit deployment <deployment_name>
  2. Add the following environment variables under the env section:

    Variable Required? Description
    PA_ADDITIONAL_ENV_RESTORE Yes

    Must be set to true to enter the additional-restore execution path.

    PA_RESTORE_ID Yes A unique ID used for idempotency. This prevents the restore from re-running if the pod restarts. It tracks flags such as .restore_completed_<id>.
    TENANT_ID Yes The unique identifier for the tenant being added. This variable is required for both the restore script and the S3 downloader.

    BACKUP_PATH

    Yes

    This variable must point to an existing directory inside the container where the backup files reside.

Troubleshooting and Additional Notes

  • Idempotency: For container environment, always change the PA_RESTORE_ID if you need to re-run a failed restoration attempt.

  • Path validation: For all platforms, double-check that the BACKUP_PATH is an absolute path and that the user running the tool has read permissions for that directory.

  • Overwrite flag: Never set -o true unless you intend to wipe the existing rows that conflict with it and replace them entirely with backup data.