Skip to main content

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​

OptionDescription
--backup-plans, -bJSON 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, -vComma-separated volume IDs to attach to the plan
CommandDescription
dtctl backup-plan listList backup plans
dtctl backup-plan showShow a backup plan
dtctl backup-plan updateUpdate a backup plan
dtctl backup-plan deleteDelete a backup plan
dtctl backup-plan add-volumesAdd volumes to a plan
dtctl backup-plan disableEnable or disable a backup plan
dtctl backup-plan remove-volumesRemove volumes from a plan
dtctl backup-plan volumesList a plan's volumes

Global Flags​

OptionDescription
--api-urlSend this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1")
--config, -cSpecify a custom config file
Default: ~/.config/dtctl/config.yaml
--no-headersOmit the column headers, for scripting
Default: false
--output, -oOutput format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line
Default: text