SQL Clone 4

Get-SqlCloneBackupLocation

Get-SqlCloneBackupLocation

Gets backup location details from a SQL Clone Server. This cmdlet is deprecated and is provided only for backwards compatibility.

Syntax

Get-SqlCloneBackupLocation [[-Path] <string>] [<CommonParameters>]

Description

DEPRECATED: Instead of using this cmdlet, use New-SqlCloneImage and pass full paths to your backup file(s) using the BackupFileName argument.

The Get-SqlCloneBackupLocation cmdlet gets details of existing backup locations from a SQL Clone Server.

Without parameters, this cmdlet gets details of all backup locations. You can specify a particular backup location by path or use a wildcard filter.

This cmdlet returns a BackupLocationResource which can be passed to the New-SqlCloneImage cmdlet for creating an images from backup files.

Connect-SqlClone must be called before this cmdlet.

Parameters

-Path <System.String>

The path of the backup location. Wildcards are permitted. If no path is specified then details of all existing backup locations will be returned.

Aliases None
Required? false
Position? 0
Default Value None
Accept Pipeline Input true (ByValue)
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String

    The path of the backup location. Wildcards are permitted. If no path is specified then details of all existing backup locations will be returned.

Return values

The output type is the type of the objects that the cmdlet emits.

  • RedGate.SqlClone.Client.Api.Objects.BackupLocationResource

Examples

---------- EXAMPLE 1 ----------

Get-SqlCloneBackupLocation

This command gets details of all backup locations stored on a SQL Clone Server.

---------- EXAMPLE 2 ----------

Get-SqlCloneBackupLocation -Path '\\shared-drive\Backups'

This command gets details of the backup location with the path '\\shared-drive\Backups'.

---------- EXAMPLE 3 ----------

Get-SqlCloneBackupLocation -Path '\\shared-drive\*'

This command gets details of all backup locations stored under '\\shared-drive'

---------- EXAMPLE 4 ----------

Connect-SqlClone -ServerUrl 'http://sql-clone.example.com:14145'
$BackupLocation = Get-SqlCloneBackupLocation -Path '\\shared-drive\backups'
$ImageDestination = Get-SqlCloneImageLocation -Path '\\shared-drive\sql-clone-images'

$ImageOperation = New-SqlCloneImage -Name 'Example-Image' `
    -BackupLocation $BackupLocation `
    -BackupFileName @('ExampleBackup.bak') `
    -Destination $ImageDestination

$ImageOperation | Wait-SqlCloneOperation

This example creates a new SQL Clone image from a backup stored at '\\shared-drive\backups\ExampleBackup.bak'.

The image will be named 'Example-Image' and stored under '\\shared-drive\sql-clone-images'.


Didn't find what you were looking for?