Skip to content

Importing and Exporting Profiles

ntkDeploy lets you export profiles to JSON files and import them back — with configurable conflict resolution. Use these features to back up your profile library, migrate configurations between environments, or share templates with other administrators.


Prerequisites

  • At least one profile must exist before you can export — see Creating a Profile.
  • Profiles to be imported must conform to the ntkDeploy JSON bundle format produced by the export function.
  • You need filesystem write access to the path where the export file will be saved.

Exporting profiles

ntkDeploy exports all profiles currently loaded as a single JSON bundle.

  1. Navigate to Profiles in the sidebar.
  2. In the Profile Configurations header toolbar, click the Export button (download icon).
  3. An Export Safety Notice dialog appears:

Export files are redacted by default. Deployment artifacts include full provider secrets.

Provider credentials (access keys, secret keys) are replaced with redacted placeholders in all export files. Only the artifact built during an actual deployment contains live credentials.

  1. Click Continue Export.
  2. A Save File dialog opens. The default filename is ntk_profiles_export.json. Choose a location and click Save.
  3. A confirmation snackbar reports how many profiles were exported.

Export file structure

An export bundle is a JSON object with the following top-level fields:

{
  "version": "1.0",
  "exportedAt": "2026-03-03T12:00:00.000Z",
  "_metadata": {
    "schemaVersion": "v1.0",
    "exportedAt": "2026-03-03T12:00:00.000Z",
    "hasPolicyConfig": false,
    "requiresPreflight": false,
    "containsRedactedSecrets": true
  },
  "profiles": [ ... ]
}

Each entry in the profiles array contains:

Field Description
name Profile display name
environment Environment label (e.g. Development, Production)
description Optional text description
department Optional department tag
schemaVersion Schema version used (currently v1.0)
settingsJson Full profile settings — provider secrets are redacted
priority Display-order integer
_metadata Per-profile flags: hasPolicyConfig, requiresPreflight, containsRedactedSecrets

Note: containsRedactedSecrets: true in _metadata means live provider credentials are not present. Do not use an export bundle as a deployment artifact — import it into ntkDeploy and deploy from there.


Importing profiles

  1. Navigate to Profiles.
  2. Click the Import button (upload icon) in the Profile Configurations toolbar.
  3. A File Picker dialog opens, filtered to .json files. Select your export bundle and click Open.
  4. The Import Profiles conflict strategy dialog appears immediately. Select how the import should handle profiles whose name and environment already exist in your database — see Conflict resolution.
  5. Click the appropriate strategy button to begin the import.
  6. A success snackbar reports the number of imported profiles. The profile list and environment list refresh automatically.

What is validated during import

The import service performs the following checks before writing any data:

Check What is validated
File structure File must contain version and profiles top-level fields
Required profile fields Each entry must have name, environment, schemaVersion, settingsJson, and priority
Schema version schemaVersion must be registered in ntkDeploy's schema registry
Settings validation settingsJson is validated against the declared schema — profiles that fail validation abort the import
Policy configuration ABAC policy bundles (if present) are validated before accepting the profile

If any check fails, an error dialog describes the exact problem. Profiles that were already committed before the failing entry remain saved.


Conflict resolution

A conflict occurs when an imported profile has the same name and environment as a profile already in your database. The conflict strategy dialog offers three options:

Strategy Button label Behaviour
Auto-Rename (Recommended) 🔄 Auto-Rename (Recommended) Imports the conflicting profile with (Imported) appended to its name — for example, Base Config becomes Base Config (Imported). A new profile is created; the original is untouched.
Overwrite 🔁 Overwrite Replaces the existing profile's settings with the imported data (creates a new profile version). The original Profile ID is preserved.
Skip ⏭️ Skip Conflicts Conflicting profiles in the bundle are silently skipped. Non-conflicting profiles in the same bundle are still imported.

Tip: Use Auto-Rename when importing a template or syncing configs from a colleague. Use Overwrite when restoring from a backup. Use Skip when applying a partial update and existing local versions should be preserved.

The selected strategy applies uniformly to all conflicts in a single import run. There is no per-profile override within one operation.


Common use cases

Migrating between environments

Move profiles from a Development database to Staging or Production:

  1. Open ntkDeploy connected to the source environment.
  2. Export all profiles to ntk_profiles_export.json.
  3. Copy the file to the machine running ntkDeploy for the target environment.
  4. In the target instance, import the file and choose Auto-Rename to avoid colliding with any existing production configs.
  5. Review imported profiles — update environment labels as needed, re-assign provider instances (credentials are redacted in the export), and validate before deploying.

Backup and restore

Exporting profiles regularly is the recommended manual backup method:

  • Save the export bundle to a version-controlled directory or network share.
  • To restore, import the backup file using Overwrite to replace current profile data with the backup state.
  • For a non-destructive restore — keeping current versions alongside the backup — use Auto-Rename to import the backup as parallel records.

Sharing configuration templates

Share a common baseline configuration across team members or sites:

  1. Build and validate the template profile in ntkDeploy.
  2. Export — the file is safe to share because all credentials are redacted.
  3. The recipient imports the file. Because provider credentials are absent, they must configure their own provider instances (see Using Providers) and re-assign them to the imported profile's sources before deploying.

Important: Imported profiles that contain an ABAC policy bundle (requiresPreflight: true in _metadata) must pass a successful preflight check before they can be deployed.


Safeguards and error handling

Scenario What happens
File is not valid JSON A FormatException error dialog is shown. No profiles are affected.
Missing version or profiles field An error dialog specifies the missing field. Import is aborted.
Unknown schemaVersion Import is aborted with a message identifying the unrecognised version string.
Settings fail schema validation Import is aborted; the offending profile name and validation errors are listed.
Missing required profile field Import is aborted; the missing field name is displayed.
File picker is cancelled Import is silently aborted; database is unchanged.
No profiles loaded at export time A snackbar says "No profiles to export" and no dialog is shown.

Next Steps