Import Command

The import command allows you to import state or configuration data into your Ocuroot system.

Usage

ocuroot import [file] [flags]

Description

The import command loads state or configuration data into your Ocuroot system. This is useful for:

  • Restoring from backups
  • Migrating between environments
  • Setting up new instances
  • Testing configurations

Arguments

  • file: Path to the file containing the state or configuration to import

Flags

  • --format: Specify input format (json, yaml)
  • --force: Override existing configurations

Examples

# Import from a file
ocuroot import state.json

# Import with specific format
ocuroot import config.yaml --format yaml

# Force import over existing config
ocuroot import state.json --force

Validation

The import command performs several validation checks:

  • File format validation
  • Schema validation
  • Resource reference validation
  • Dependency checks
  • export: Export state or configuration
  • sync: Synchronize state with server