ipol — Policy Manager
ipol manages insurance policy data migration between environments. It provides commands to export, import, copy, and transfer policy records stored in DB2 databases.
Commands
Export a Policy
ipol export --region <REGION> --id <POLICY_ID> [--tag <TAG>]
Exports a policy's data from a DB2 database into a compressed archive file (.ixf.tar.zst).
Example:
ipol export --region DEV --id POL-2024-001 --tag backup-v1
Import a Policy
ipol import --region <REGION> --file <ARCHIVE_PATH>
Imports a policy archive into a target database environment.
Example:
ipol import --region ST --file ./exports/policy_POL001_backup.ixf.tar.zst
Copy a Policy Between Environments
ipol copy --from <SOURCE_REGION> --to <DEST_REGION> --id <POLICY_ID>
Copies a policy from one environment to another. This combines export + transfer + import in a single operation.
Example:
ipol copy --from DEV --to ST --id POL-2024-001
Download a Policy Archive from Remote
ipol download --region <REGION> --id <POLICY_ID>
Downloads a policy archive from a remote server to your local machine.
Check Task Status
ipol task
Lists all policy tasks and their current status.
List Available Regions
ipol regions
Lists all configured regions from the iman.toml configuration.
How Policy Migration Works
Export Process
- Reads the table list from CSV configuration
- For each table, generates a SQL query using the policy ID
- Exports each table's data to IXF format using DB2
- Creates metadata (
meta.toml) with record counts - Compresses everything into a
.ixf.tar.zstarchive
Import Process
- Decompresses the archive
- Reads metadata to identify the source policy
- Deletes existing data for that policy in the target database
- Imports each IXF file into the corresponding table
- Retries failed tables (up to 3 attempts)
- Verifies import counts match the export
Copy Scenarios
| Source | Destination | What Happens |
|---|---|---|
| Local | Local | Export → Import (direct) |
| Local | Remote | Export → Upload → Import on remote |
| Remote | Local | Download → Import locally |
| Remote | Remote | Download → Upload → Import on remote |
Archive Format
Each policy archive contains:
policy_POL001_backup.ixf.tar.zst
├── meta.toml # Metadata (table count, record count, source)
├── POLICY.ixf # Table data in IXF format
├── COVERAGE.ixf
├── PREMIUM.ixf
├── ...
├── POLICY_export.msg # Export messages
└── POLICY_delete.sql # Generated cleanup SQL
Task Monitoring
Policy operations run as background tasks on the isman server. You can monitor their progress:
- VS Code: Open the Ingenium Management panel → Policy Tasks section
- CLI: Run
ipol taskto list all tasks
Each task shows its current status: New, Waiting, Active, Processing, Done, or Error.
For most day-to-day work, use the VS Code extension's sidebar to manage policies — it provides a visual task tracker with live status updates.