Get-RubrikDatabase
SYNOPSIS
Retrieves details on one or more databases known to a Rubrik cluster
SYNTAX
Query (Default)
ID
DESCRIPTION
The Get-RubrikDatabase cmdlet is used to pull a detailed data set from a Rubrik cluster on any number of databases. To narrow down the results, use the host and instance parameters to limit your search to a smaller group of objects. Alternatively, supply the Rubrik database ID to return only one specific database.
EXAMPLES
EXAMPLE 1
This will return details on all databases named DB1 protected by the Gold SLA Domain on any known host or instance.
EXAMPLE 2
This will return the Database object with all properties, including additional details such as snapshots taken of the database and recovery point date/time information. Using this switch parameter negatively affects performance
EXAMPLE 3
This will return details on a database named "DB1" living on an instance named "MSSQLSERVER" on the host named "Host1".
EXAMPLE 4
This will return all removed databases that were formerly protected by Rubrik.
EXAMPLE 5
This will return all databases that are currently protected by Rubrik.
EXAMPLE 6
This will return all databases that are currently or formerly protected by Rubrik.
EXAMPLE 7
This will return details on a single database matching the Rubrik ID of "MssqlDatabase:::aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" Note that the database ID is globally unique and is often handy to know if tracking a specific database for longer workflows, whereas some values are not unique (such as nearly all hosts having one or more databases named "model") and more difficult to track by name.
EXAMPLE 8
This will return details on a single SQL instance matching the Rubrik ID of "MssqlInstance:::aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
EXAMPLE 9
This will return all databases in the BestAvailabilityGroup AG. If it matches multiple availability group names it will default to querying by host name instead
EXAMPLE 10
Query for databases by availability group ID
PARAMETERS
-id
Rubrik's database id value
-Name
Name of the database
-Relic
Filter results to include only relic (removed) databases
-SLA
SLA Domain policy assigned to the database
-Instance
Name of the database instance
-Hostname
Name of the database host
-ServerInstance
ServerInstance name (combined hostname\instancename)
-InstanceID
SQL InstanceID, used as a unique identifier
-AvailabilityGroupName
Availability Group Name
-AvailabilityGroupID
SQL AvailabilityGroupID, used as a unique identifier
-PrimaryClusterID
Filter the summary information based on the primarycluster_id of the primary Rubrik cluster. Use 'local' as the primary_cluster_id of the Rubrik cluster that is hosting the current REST API session.
-SLAID
SLA id value
-DetailedObject
DetailedObject will retrieved the detailed database object, the default behavior of the API is to only retrieve a subset of the database object unless we query directly by ID. Using this parameter does affect performance as more data will be retrieved and more API-queries will be performed.
-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
RELATED LINKS
Last updated