LoginSignup
2
2

More than 5 years have passed since last update.

PowerShellでAzureSQLDatabaseのポイントインタイム リストアでのDB復元

Last updated at Posted at 2016-10-31

PowershellでSQLDatabaseのリストア

AzurePowershellのクラシックモード版

メモとして残しておきます

まずはお決まりのやつ

Add-AzureAccount
Set-AzureSubscription -SubscriptionId "SubscriptionId"

データベース情報取得

$SourceServerName = "serverName" 
$SourceDatabaseName = "DatabaseName"
$SourceDatabase = Get-AzureSqlDatabase -ServerName $SourceServerName -DatabaseName $SourceDatabaseName

復元後のデータベース名を決める

$TargetDatabaseName = "xxxx" + (Get-Date -Format "_yyyyMMdd")

リストア開始

Start-AzureSqlDatabaseRestore -SourceDatabase $SourceDatabase -TargetDatabaseName $TargetDatabaseName
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2