Get-RubrikSnapshot

SYNOPSIS

Retrieves all of the snapshots (backups) for any given object

SYNTAX

Latest

Get-RubrikSnapshot -id <String> [-CloudState <Int32>] [-OnDemandSnapshot] [-Latest] [-Server <String>]
 [-api <String>] [<CommonParameters>]

Date

Get-RubrikSnapshot -id <String> [-CloudState <Int32>] [-OnDemandSnapshot] -Date <DateTime> [-Range <Int32>]
 [-ExactMatch] [-Server <String>] [-api <String>] [<CommonParameters>]

Query

Get-RubrikSnapshot -id <String> [-CloudState <Int32>] [-OnDemandSnapshot] [-Server <String>] [-api <String>]
 [<CommonParameters>]

SnapshotID

Get-RubrikSnapshot [-CloudState <Int32>] [-OnDemandSnapshot] -SnapshotId <String> [-SnapshotType <String>]
 [-Server <String>] [-api <String>] [<CommonParameters>]

DESCRIPTION

The Get-RubrikSnapshot cmdlet is used to query the Rubrik cluster for all known snapshots (backups) for any protected object The correct API call will be made based on the object id submitted Multiple objects can be piped into this function so long as they contain the id required for lookup

EXAMPLES

EXAMPLE 1

This will return all snapshot (backup) data for the virtual machine id of "VirtualMachine:::aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee-vm-12345"

EXAMPLE 2

This will return all snapshot (backup) data for the fileset with id of "Fileset:::01234567-8910-1abc-d435-0abc1234d567"

EXAMPLE 3

This will return the closest matching snapshot, within 1 day, to March 21st, 2017 for any virtual machine named "Server1"

EXAMPLE 4

This will return the closest matching snapshot, within 3 days, to March 21st, 2017 for any virtual machine named "Server1"

EXAMPLE 5

This will return the closest matching snapshot, within 3 days, to March 21st, 2017 for any virtual machine named "Server1". -ExactMatch specifies that no results are returned if a match is not found, otherwise all snapshots are returned.

EXAMPLE 6

This will return the closest matching snapshot to the current date and time for any virtual machine named "Server1"

EXAMPLE 7

This will return the latest snapshot for the virtual machine named "Server1"

EXAMPLE 8

Will query for specific SnapshotId querying common snapshot endpoints until a result is returned

EXAMPLE 9

Will query for specific SnapshotId for the vmware/vm/snapshot/{id} endpoint

PARAMETERS

-id

Rubrik id of the protected object

-CloudState

Filter results based on where in the cloud the snapshot lives

-OnDemandSnapshot

Filter results to show only snapshots that were created on demand

-Date

Date of the snapshot

-Range

Range of how many days away from $Date to search for the closest matching snapshot. Defaults to one day.

-ExactMatch

Return no results if a matching date isn't found. Otherwise, all snapshots are returned if no match is made.

-SnapshotId

Query by the snapshot id directly, in case a snapshot id is known and the snapshot's information needs to be retrieved

-SnapshotType

Specifies the snapshot type to query for the supplied

-Latest

Return the latest snapshot

-Server

Rubrik server IP or FQDN

-api

API version

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Written by Chris Wahl for community usage Twitter: @ChrisWahl GitHub: chriswahl

https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/get-rubriksnapshot

Last updated

Was this helpful?