IN THIS ARTICLE
This article explains how you can take snapshots on a schedule automatically, by using the qq
CLI.
REQUIREMENTS
Qumulo Core 2.5.2 (and higher)
Note: Qumulo Core 2.6.6 adds Web UI support for creating, editing, and deleting snapshots. For more information, see Taking Directory Snapshots on Demand or by Using a Snapshot Policy.
DETAILS
The following are commands that you can use to create and manage snapshot policies.
- Create a new snapshot scheduling policy
qq snapshot_create_policy
- Delete a single scheduling policy
qq snapshot_delete_policy
- List a single policy
qq snapshot_get_policy
- List all policies
qq snapshot_list_policies
- Modify an existing snapshot scheduling policy
qq snapshot_modify_policy
Each policy can specify the interval at which to take the snapshot (hourly_or_less
, daily
, or monthly
) and the expiration rule. In the following example, you create a new policy called every_day
that takes a daily snapshot at midnight Pacific and keeps it for seven days.
qq snapshot_create_policy daily --name every_day --time-to-live 7days \
--timezone America/Los_Angeles --days-of-week all --at 00:00
The following is the output of this command.
{ "enabled": true, "id": 1, "policy_name": "every_day", "schedule": { "creation_schedule": { "frequency": "SCHEDULE_DAILY_OR_WEEKLY", "hour": 0, "minute": 0, "on_days": [ "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ], "timezone": "America/Los_Angeles" }, "expiration_time_to_live": "7days", "id": 1 }, "snapshot_name_template": "{ID}_{Policy}", "source_file_id": "2" }
Note: The timezone
field uses a location description from the INIA database. If you don't specify the time zone is specified, the snapshot schedule is in UTC by default. The following are examples of valid time zones:
America/New_York
America/Chicago
America/Denver
America/Phoenix
America/Los_Angeles
In the following example, we create an hourly policy that triggers only during business hours (Monday-Friday, 8am-6pm Pacific) and keeps snapshots for two days.
qq snapshot_create_policy hourly_or_less --name hourly \
--timezone America/Los_Angeles --days-of-week MON,TUE,WED,THU,FRI \
--start-time 08:00 --end-time 18:00 --period 1hours \
--time-to-live 2days
The following is the output of this command.
{ "enabled": true, "id": 1, "policy_name": "every_day", "schedule": { "creation_schedule": { "frequency": "SCHEDULE_DAILY_OR_WEEKLY", "hour": 0, "minute": 0, "on_days": [ "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ], "timezone": "America/Los_Angeles" }, "expiration_time_to_live": "7days", "id": 1 }, "snapshot_name_template": "{ID}_{Policy}", "source_file_id": "2" }
Comments
0 comments