Skip to content

Package Backup and Restore

This page explains how to back up and restore a package in kdb Insights Enterprise using the CLI.

The package backup and restore feature allows you to easily back up all accessible packages from kdb Insights Enterprise to your local machine and restore them later.

This simplifies package management as it enables you to back up all the packages at once instead of just downloading packages individually.

Package backup

This option allows you to download all the packages that are accessible to you from the kdb+ Insights Enterprise Package Manager service into a single .zip file on your local machine.

In order to do that, run the following command:

kxi pm backup

Package restore

This option allows you to push all the packages from a previously created backup .zip file to kdb+ Insights Enterprise Package Manager service.

For that, run the following command:

kxi pm restore

You can also use the --force option to override existing packages in the system:

kxi pm restore --force

Using --force avoids the need to delete packages before restoring an older state. This is particularly useful because deleting packages also removes associated entitlements, while restoring with --force preserves entitlements.

If any entitlements have been deleted since the backup was created, the user performing the restore automatically inherits ownership of those packages. However, if the entitlements are still present, the original ownership remains unchanged. Regardless of entitlement status, the "last pushed by" metadata reflects the identity of the user who performed the restore.

Validation errors

The kxi pm restore command attempts to restore all valid packages, but prints validation errors if it encounters an invalid package.

To resolve issues with invalid packages:

  1. Unpack the backup .zip file.
  2. Identify and fix the issues one at a time in the referenced .kxi files.
  3. Push the fixed packages individually.

These kinds of validation issues may occur particularly when using backup and restore across different versions of the system.