Skip to content

Commit 74743dc

Browse files
committed
documentation
1 parent c849c37 commit 74743dc

File tree

2 files changed

+97
-31
lines changed

2 files changed

+97
-31
lines changed

README.md

Lines changed: 96 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ Civo CLI is a tool to manage your [Civo.com](https://www.civo.com) account from
2929
- [SSH Keys](#ssh-keys)
3030
- [Disk Images](#disk-images)
3131
- [Volumes](#volumes)
32+
- [Resource Snapshots](#resource-snapshots)
3233
- [Teams](#teams)
3334
- [Permissions](#permissions)
3435
- [Region](#region)
35-
- [Resource Snapshots](#resource-snapshots)
3636
- [Enabling shell autocompletion](#enabling-shell-autocompletion)
3737
- [Contributing](#contributing)
3838
- [License](#license)
@@ -2155,6 +2155,101 @@ The volume called CLI-demo-volume with ID 59076ec8-edba-4071-80d0-e9cfcce37b12 w
21552155
21562156
If a Kubernetes volume is showing with a status of `dangling` it can be deleted to release the quota and prevent further billing by running `civo volume delete <VOLUME-NAME> --region <REGION-NAME>`.
21572157
2158+
2159+
## Resource Snapshots
2160+
2161+
Resource snapshots allow you to manage snapshots of your resources.
2162+
2163+
> [!IMPORTANT]
2164+
> Currently, Resource Snapshots will only display Instance Snapshots. More resource types will be supported in the future.
2165+
2166+
You can list, show details, update, delete, and restore snapshots using the following commands:
2167+
2168+
```sh
2169+
# List all resource snapshots
2170+
civo resource-snapshot list
2171+
2172+
# Show details of a specific snapshot
2173+
civo resource-snapshot show SNAPSHOT_ID/NAME
2174+
2175+
# Update a snapshot
2176+
civo resource-snapshot update SNAPSHOT_ID/NAME
2177+
2178+
# Delete a snapshot
2179+
civo resource-snapshot delete SNAPSHOT_ID/NAME
2180+
2181+
# Restore a snapshot
2182+
civo resource-snapshot restore SNAPSHOT_ID/NAME
2183+
```
2184+
2185+
The available fields for custom output format when listing snapshots are:
2186+
- id
2187+
- name
2188+
- description
2189+
- resource_type
2190+
- created_at
2191+
2192+
### Snapshot Schedules
2193+
2194+
Resource snapshots allow you to automate the creation and management of snapshots of your resources.
2195+
2196+
> [!IMPORTANT]
2197+
> Currently, Snapshot Schedules only work with Instance Snapshots. More resource types will be supported in the future.
2198+
2199+
#### Creating a Schedule
2200+
2201+
To create a snapshot schedule:
2202+
2203+
```sh
2204+
$ civo snapshot schedule create --name SCHEDULE_NAME --cron CRON_EXPRESSION --instance-id="INSTANCE_ID1,INSTANCE_ID2,..." --max-snapshots MAX_SNAPSHOTS [flags]
2205+
2206+
Flags:
2207+
-d, --description string Description for the snapshot schedule
2208+
-v, --include-volumes Include attached volumes in snapshots
2209+
```
2210+
2211+
##### Listing Schedules
2212+
2213+
To view all available schedules:
2214+
2215+
```sh
2216+
$ civo snapshot schedule list
2217+
```
2218+
2219+
##### Viewing Schedule Details
2220+
2221+
To view the details of a specific schedule:
2222+
2223+
```sh
2224+
$ civo snapshot schedule show SCHEDULE_NAME/ID
2225+
```
2226+
2227+
##### Updating a Schedule
2228+
2229+
To update the details of a snapshot schedule:
2230+
2231+
```sh
2232+
$ civo snapshot schedule update SCHEDULE_NAME/ID [flags]
2233+
2234+
Flags:
2235+
-d, --description string New description for the snapshot schedule
2236+
-n, --name string New name for the snapshot schedule
2237+
-p, --paused string Whether to pause the snapshot schedule (use 'true' or 'false')
2238+
```
2239+
2240+
Example:
2241+
```sh
2242+
$ civo snapshot schedule update my-snapshot --name new-schedule-name --description "Updated schedule description" --paused true
2243+
```
2244+
2245+
##### Removing a Schedule
2246+
2247+
To delete a snapshot schedule:
2248+
2249+
```sh
2250+
$ civo snapshot schedule remove SCHEDULE_NAME/ID
2251+
```
2252+
21582253
## Teams
21592254
21602255
Teams are a grouping of users, each member of a team having one or more permissions, or roles. When a user logs in, they don't have to select which team to use - only which account they want to act within. The permissions available are the total set of permissions they have across the teams in that account, combined.
@@ -2280,35 +2375,6 @@ $ civo permissions ls
22802375
22812376
## Region
22822377
2283-
## Resource Snapshots
2284-
2285-
Resource snapshots allow you to manage snapshots of your resources. You can list, show details, update, delete, and restore snapshots using the following commands:
2286-
2287-
```sh
2288-
# List all resource snapshots
2289-
civo resource-snapshot list
2290-
2291-
# Show details of a specific snapshot
2292-
civo resource-snapshot show SNAPSHOT_ID/NAME
2293-
2294-
# Update a snapshot
2295-
civo resource-snapshot update SNAPSHOT_ID/NAME
2296-
2297-
# Delete a snapshot
2298-
civo resource-snapshot delete SNAPSHOT_ID/NAME
2299-
2300-
# Restore a snapshot
2301-
civo resource-snapshot restore SNAPSHOT_ID/NAME
2302-
```
2303-
2304-
The available fields for custom output format when listing snapshots are:
2305-
- id
2306-
- name
2307-
- description
2308-
- resource_type
2309-
- created_at
2310-
2311-
23122378
As Civo grows, more regions for your instances will become available. You can run `civo region ls` to list the regions available. Block storage (Volumes) is region-specific, so if you configure an instance in one region, any volumes you wish to attach to that instance would have to be in the same region.
23132379
23142380
#### List all region

cmd/snapshot/snapshot_schedule_update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ var snapshotScheduleUpdateCmd = &cobra.Command{
7676
func init() {
7777
snapshotScheduleUpdateCmd.Flags().StringVarP(&scheduleName, "name", "n", "", "New name for the snapshot schedule")
7878
snapshotScheduleUpdateCmd.Flags().StringVarP(&scheduleDescription, "description", "d", "", "New description for the snapshot schedule")
79-
snapshotScheduleUpdateCmd.Flags().StringVarP(&schedulePaused, "paused", "p", "", "Whether to pause the snapshot schedule (use 'true' and 'false')")
79+
snapshotScheduleUpdateCmd.Flags().StringVarP(&schedulePaused, "paused", "p", "", "Whether to pause the snapshot schedule (use 'true' or 'false')")
8080
}

0 commit comments

Comments
 (0)