You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Restore-DbaDatabase.ps1
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ function Restore-DbaDatabase {
166
166
Use this for log shipping secondary servers or when you need read-only access during restore operations.
167
167
The directory must exist and be writable by the SQL Server service account for undo file creation.
168
168
169
-
.PARAMETERStorageCredential
169
+
.PARAMETERStorageCredential
170
170
Specifies the SQL Server credential name for authenticating to Azure blob storage or S3-compatible object storage during restore operations.
171
171
Use this when restoring from Azure blob storage or S3 backups that require authentication.
172
172
For Azure: The credential must contain valid Azure storage account keys or SAS tokens.
@@ -240,11 +240,16 @@ function Restore-DbaDatabase {
240
240
Marked point in the transaction log to stop the restore at (Mark is created via BEGIN TRANSACTION (https://docs.microsoft.com/en-us/sql/t-sql/language-elements/begin-transaction-transact-sql?view=sql-server-ver15)).
241
241
242
242
.PARAMETERStopBefore
243
-
Switch to indicate the restore should stop before StopMark occurs, default is to stop when mark is created.
243
+
Switch to indicate the restore should stop before StopMark or StopAtLsn occurs, default is to stop when mark/LSN is reached.
244
244
245
245
.PARAMETERStopAfterDate
246
246
By default the restore will stop at the first occurence of StopMark found in the chain, passing a datetime where will cause it to stop the first StopMark atfer that datetime.
247
247
248
+
.PARAMETERStopAtLsn
249
+
Log Sequence Number (LSN) in the transaction log at which to stop the restore operation.
250
+
Use this for precise point-in-time recovery to an exact LSN, which provides more granular control than timestamp-based recovery.
251
+
The LSN value can be obtained from sys.fn_dblog, backup headers, or error logs. Combine with -StopBefore to stop just before the specified LSN.
252
+
248
253
.PARAMETERChecksum
249
254
Enables backup checksum verification during restore operations. Forces the restore to verify backup checksums and fail if checksums are not present.
250
255
Use this to ensure backup files contain checksums and validate them during restore, following backup best practices.
@@ -435,6 +440,16 @@ function Restore-DbaDatabase {
435
440
436
441
Restores the backups from \\ServerName\ShareName\File as database, stops before the first 'OvernightStart' mark that occurs after '21:00 10/05/2020'.
0 commit comments