This post was originally published on Pure Storage
This blog on point-in-time recovery originally appeared on www.nocentino.com. It has been republished with permission from the author.
In this post, the second in our series, I will guide you through using the new T-SQL snapshot backup feature in SQL Server 2022 to take a snapshot backup and perform point-in-time database restores using a snapshot backup as the base of the restore. We will explore how to manage storage-level operations, such as cloning snapshots and executing an instantaneous point-in-time restore of a database from the snapshot with minimal impact on your infrastructure. Additionally, I will demonstrate a PowerShell script that utilizes dbatools and the PureStoragePowerShellSDK2 modules to automate the process.
You can grab the whole script for this blog post on GitHub.
Taking a T-SQL Snapshot Backup
In the previous post in this series, “Using T-SQL Snapshot Backup: Are Snapshots Backups?” we covered the theory of using T-SQL snapshot backup for backup and restore operations. Now let’s get down to business and walk through the process of taking a T-SQL snapshot backup.
Initialize the Script’s Variables and Connections To begin, we’ll set up some PowerShell variables to establish a connection to our SQL Server. We’ll also set some variables
— Read the rest of this post, which was originally published on Pure Storage.