Thor Logo dbatools

Restore

Restore-DbaDbSnapshot

Simone Bizzotto (@niphold)

Restore-DbaDbSnapshot View Source Simone Bizzotto (@niphold) Windows, Linux, macOS Synopsis Restores SQL Server databases from database snapshots, reverting to the snapshot’s point-in-time state Description Restores SQL Server databases to their exact state when a database snapshot was created, discarding all changes made since that point. This is particularly useful for quickly reverting development databases after testing, rolling back problematic changes, or returning to a known good state without restoring from backup files.

Read more

Select-DbaBackupInformation

Stuart Moore (@napalmgram), stuart-moore.com

Select-DbaBackupInformation View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Filters backup history to identify the minimum backup chain needed for point-in-time database recovery Description Analyzes backup history objects and determines the exact sequence of backups required to restore a database to a specific point in time. This function handles the complex LSN logic to identify which full, differential, and log backups are needed, eliminating the guesswork of manual restore planning.

Read more

Test-DbaBackupInformation

Stuart Moore (@napalmgram), stuart-moore.com

Test-DbaBackupInformation View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Validates backup history objects to ensure successful database restoration Description Performs comprehensive pre-restore validation on backup history objects to prevent restore failures before they occur. Input is typically from Format-DbaBackupInformation and gets parsed to verify restore readiness. This function runs critical validation tests including LSN chain integrity for transaction log backups, backup file accessibility by the SQL Server service account, database existence conflicts, and file path availability.

Read more

Test-DbaLastBackup

Chrissy LeMaire (@cl), netnerds.net

Test-DbaLastBackup View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Quickly and easily tests the last set of full backups for a server. Description Restores all or some of the latest backups and performs a DBCC CHECKDB. Gathers information about the last full backups Restores the backups to the Destination with a new name. If no Destination is specified, the originating SQL Server instance wil be used. The database is restored as “dbatools-testrestore-$databaseName” by default, but you can change dbatools-testrestore to whatever you would like using -Prefix The internal file names are also renamed to prevent conflicts with original database A DBCC CHECKDB is then performed And the test database is finally dropped Syntax Test-DbaLastBackup [[-SqlInstance] <DbaInstanceParameter[]>] [[-SqlCredential] <PSCredential>] [[-Database] <Object[]>] [[-ExcludeDatabase] <Object[]>] [[-Destination] <DbaInstanceParameter>] [[-DestinationSqlCredential] <Object>] [[-DataDirectory] <String>] [[-LogDirectory] <String>] [[-FileStreamDirectory] <String>] [[-Prefix] <String>] [-VerifyOnly] [-NoCheck] [-NoDrop] [-CopyFile] [[-CopyPath] <String>] [[-MaxSize] <Int32>] [[-DeviceType] <String[]>] [-IncludeCopyOnly] [-IgnoreLogBackup] [[-AzureCredential] <String>] [[-InputObject] <Database[]>] [[-MaxTransferSize] <Int32>] [[-BufferCount] <Int32>] [-IgnoreDiffBackup] [[-MaxDop] <Int32>] [-ReuseSourceFolderStructure] [-EnableException] [-WhatIf] [-Confirm] [<CommonParameters>] Examples Example: 1 PS C:\> Test-DbaLastBackup -SqlInstance sql2016 Determines the last full backup for ALL databases, attempts to restore all databases (with a different name and file structure), then performs a DBCC CHECKDB.

Read more

dbatools to the backup/restore rescue

Chrissy LeMaire

Today’s blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a monthly blog party on the second Tuesday of each month. Everyone is welcome to participate. intro dbatools has been around since 2014. At first, it started with one contributor and was solely dedicated to migrating SQL Server instances, but now it’s grown into an awesome open source DBA project with over 30 contributors.

Read more
← Previous
1 2
Next →
Page 2 of 2