Scheduling Snapshots with PowerShell module v1.2

Snapshot your volumes regularly!

One of the new features in version 1.2 of SolidFire PowerShell Tools is Snapshot Scheduling. Now you can create, modify, pause, restart, and remove a schedule for automatic, reoccurring volume snapshot creation. This is helpful when you need to automate the creation or maintenance of a volume and want to ensure snapshots are scheduled on your desired interval. The snapshot created can be used later as a backup or rollback to ensure the data on a volume or group of volumes is consistent for the point in time in which the snapshot was created. The cluster will run the scheduler process every 5 minutes. When it runs, it evaluates all the active schedules and determines if it needs to create a snapshot or remove a schedule entry.

Note: Creating a snapshot is allowed if cluster fullness is at stage 2 or 3. Snapshots are not created when cluster fullness is at stage 4 or 5.

The SolidFire PowerShell Tools module version 1.2 releases in late March 2016. You can download it from the SolidFire PowerShell github repository.

New-SFSchedule

Required

  • VolumeID: This can be one or many IDs for the volumes you want to take a snapshot of on this schedule.
  • ScheduleName: The name of the schedule you are creating.
  • Frequency: Snapshot schedules run in three different frequency modes: TimeInterval, DaysOfWeek, and DaysOfMonth.
    • TimeInterval: Snapshots scheduled in this mode will be taken once every XX days, XX hours, or XX minutes. You specify the length of time between snapshots and they will be created on that interval.
    • DaysOfWeek: Snapshots scheduled in this mode will be taken once a day on every day of the week selected. You choose any or all days Monday through Sunday and specify the time of day it should be taken on.
    • DaysOfMonth: Snapshots scheduled in this mode will be taken once a day on every day of the month selected. You choose any or all days 1 – 31 and specify the time of day it should be taken on.

There are other parameters you can set for specifying more granular details such as SnapshotName, RetentionDays/Hours, EnableReplication, and Paused. For detailed help use Get-Help New-SFSchedule -Detailed

Code:

Get-SFSchedule

Use this Cmdlet to return information about one or more scheduled snapshots that have been created.

The ScheduleID parameter allows you to specify a list of ScheduleIDs to be retrieved. If you omit this parameter, all the schedules on the cluster will be returned. For detailed help use Get-Help Get-SFSchedule -Detailed.

Code:

Set-SFSchedule

This CmdLet is used to change the intervals at which a scheduled snapshot occurs. This allows for adjustment to the snapshot frequency and retention. It can also be used to pause or restart a schedule.

Required

  • ScheduleID: This is the ID of the schedule to modify.

There are other parameters you can set for modifying other details such as VolumeID, ScheduleName, Frequency, SnapshotName, RetentionDays/Hours, EnableReplication, and Paused. For detailed help use Get-Help Set-SFSchedule -Detailed.

Code:

Pause / Restart

Sometimes you need to put a schedule on hold. Use this CmdLet to pause and restart the schedule.

Code:

Remove-SFSchedule

Use this CmdLet to remove a schedule. It will set the ToBeDeleted flag to true and the next time the schedule is evaluated, it will be deleted.

Required

  • ScheduleID: This is the ID of the schedule to modify.

For detailed help use Get-Help Remove-SFSchedule -Detailed.

Code:

Adam Haid
Adam Haid is a Sr. Engineer on the SolidFire Host Integrations team. His passion is APIs. He creates, consumes, and curses APIs on a daily basis. Adam has been working on integrations and back-end systems for over 20 years. He specializes in Microsoft technologies but has built many Java-based applications as well. Contact Adam at adam.haid@netapp.com

Leave a Reply