dtctl backup-plan create
Usage
dtctl backup-plan create [flags]
Aliases
c
Description
Create one or more backup plans from a JSON specification, optionally attaching volumes. Each plan defines a schedule (month/day/day-of-week/hour/minute) and how many recovery points to keep.
Example
dtctl backup-plan create --volume-ids <volume-id> --backup-plans '[{"name":"nightly","recoveryPoints":7,"job_schedule":{"schedule_month":"1,2,3,4,5,6,7,8,9,10,11,12","schedule_day_of_week":"1,2,3,4,5","schedule_day":"1","schedule_hour":"23","schedule_minute":"00"}}]'
Response
In text output (the default), this command returns the following columns: ID.
Pass --output json to get the full response object instead.
Flags
| Option | Description |
|---|---|
--backup-plans, -b | JSON string representing the backup plans. Required fields for each backup plan object: - name: string (required) - recoveryPoints: number (required) - job_schedule: object (required) - schedule_month: string (required, comma-separated numbers between 1 and 12, unique values) - schedule_day_of_week: string (required, comma-separated numbers between 0 and 6, unique values) - schedule_day: string (required, comma-separated numbers between 1 and 31, unique values) - schedule_hour: string (required, valid values: "19", "20", "21", "22", "23", "00") - schedule_minute: string (required, valid values: "00", "30") Optional fields: - description: string Example JSON: [ { "name": "cli-backup-plan", "recoveryPoints": 2, "job_schedule": { "schedule_month": "1,2,3,4", "schedule_day_of_week": "2", "schedule_day": "1,2,3,4", "schedule_hour": "19", "schedule_minute": "00" } }, { "name": "cli-backup-plan-2", "recoveryPoints": 3, "job_schedule": { "schedule_month": "1,2", "schedule_day_of_week": "5", "schedule_day": "1,2,3", "schedule_hour": "20", "schedule_minute": "30" } } ] (required) |
--volume-ids, -v | Comma-separated volume IDs to attach to the plan |
Related Commands
| Command | Description |
|---|---|
| dtctl backup-plan list | List backup plans |
| dtctl backup-plan show | Show a backup plan |
| dtctl backup-plan update | Update a backup plan |
| dtctl backup-plan delete | Delete a backup plan |
| dtctl backup-plan add-volumes | Add volumes to a plan |
| dtctl backup-plan disable | Enable or disable a backup plan |
| dtctl backup-plan remove-volumes | Remove volumes from a plan |
| dtctl backup-plan volumes | List a plan's volumes |
Global Flags
| Option | Description |
|---|---|
--api-url | Send this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1") |
--config, -c | Specify a custom config file Default: ~/.config/dtctl/config.yaml |
--no-headers | Omit the column headers, for scripting Default: false |
--output, -o | Output format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line Default: text |