{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antfly/json-schema/antfly-cluster-backup-request-schema.json",
  "title": "ClusterBackupRequest",
  "description": "Native cluster backups pin a common transaction cut across a dependency-complete\ntable set. Restart-stable LSM seals are journaled before releasing write fences;\nartifact upload uses those immutable seals without holding the write pause.\nNative cohorts support at most 4096 tables and 4096 ranges and require the\nfilesystem-managed LSM backend. Portable backups do not support coordinated\nUNIQUE/FK constraints or promise a common cross-table transaction cut.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antfly-cluster-management-api-openapi.yml#/components/schemas/ClusterBackupRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "backup_id",
    "location",
    "connection"
  ],
  "properties": {
    "backup_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$",
      "description": "Unique identifier for this backup. Used to reference the backup for restore operations.\nChoose a meaningful name that includes date/version information.\n"
    },
    "location": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "Storage location for the backup. Supports multiple backends:\n- Scoped filesystem connection: `file:///logical/path`\n- Amazon S3: `s3://bucket-name/path/to/backup`\n- Google Cloud Storage: `gs://bucket-name/path/to/backup`\n\nThe backup includes all table data, indexes, and metadata.\n"
    },
    "connection": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096,
      "description": "Required configured `external_io` connection with the `backup.write` capability."
    },
    "format": {
      "type": "string",
      "enum": [
        "native",
        "portable"
      ],
      "default": "portable",
      "description": "Backup format to use:\n- `native`: Engine-specific physical snapshot (fast backup and restore, same-backend only)\n- `portable`: Cross-backend logical backup in AFB format (slower restore due to index rebuild, but can be restored by any Antfly backend)\n\nOn restore, the format is auto-detected from file magic bytes.\n"
    },
    "table_names": {
      "type": "array",
      "minItems": 1,
      "maxItems": 256,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 4096
      },
      "description": "Optional list of tables to backup. If omitted, all tables are backed up,\nup to the cluster backup limit of 4096 tables. Requests above that limit\nfail before any table backup is created.\n"
    }
  }
}