Thor Logo dbatools

Restore

Backup-DbaDatabase

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

Backup-DbaDatabase View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Creates database backups with flexible destination options and enterprise backup features. Description Creates full, differential, or transaction log backups for SQL Server databases with support for local file systems, Azure blob storage, and advanced backup features like compression, encryption, and striping. Handles backup validation, automatic path creation, and flexible file naming conventions to support both automated and manual backup workflows.

Read more

Copy-DbaDatabase

Chrissy LeMaire (@cl), netnerds.net

Copy-DbaDatabase View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Migrates SQL Server databases between instances using backup/restore or detach/attach methods. Description Moves user databases from one SQL Server instance to another, supporting both on-premises and Azure SQL Managed Instance destinations. Ideal for server migrations, environment refreshes, disaster recovery testing, and cloud migrations where you need to relocate entire databases with their data and structure intact. Offers two migration methods: backup/restore (safer, supports cross-version migrations) and detach/attach (faster, requires same SQL Server version).

Read more

Format-DbaBackupInformation

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

Format-DbaBackupInformation View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Modifies backup history metadata to prepare database restores with different names, paths, or locations Description Takes backup history objects from Select-DbaBackupInformation and transforms them for restore scenarios where you need to change database names, file locations, or backup paths. This is essential for disaster recovery situations where you’re restoring to different servers, renaming databases, or moving files to new storage locations.

Read more

Get-DbaBackupInformation

Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram)

Get-DbaBackupInformation View Source Chrissy LeMaire (@cl) , Stuart Moore (@napalmgram) Windows, Linux, macOS Synopsis Scans backup files and reads their headers to create structured backup history objects for restore operations Description Reads the headers of SQL Server backup files to extract metadata and creates BackupHistory objects compatible with Restore-DbaDatabase. This eliminates the need to manually track backup chains and file locations when planning database restores. The function identifies valid SQL Server backup files from a given path, reads their headers using the SQL Server instance, and organizes them into backup sets.

Read more

Get-DbaDbRestoreHistory

Chrissy LeMaire (@cl), netnerds.net

Get-DbaDbRestoreHistory View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves database restore history from MSDB for compliance reporting and recovery analysis. Description Queries the MSDB database’s restorehistory and backupset tables to retrieve detailed information about all database restore operations performed on a SQL Server instance. This function returns comprehensive restore details including who performed the restore, when it occurred, what type of restore was performed, and the source and destination file paths.

Read more

Invoke-DbaAdvancedRestore

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

Invoke-DbaAdvancedRestore View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Executes database restores from processed BackupHistory objects with advanced customization options Description This is the final execution step in the dbatools restore pipeline. It takes pre-processed BackupHistory objects and performs the actual SQL Server database restoration with support for complex scenarios that aren’t handled by the standard Restore-DbaDatabase command. The typical pipeline flow is: Get-DbaBackupInformation | Select-DbaBackupInformation | Format-DbaBackupInformation | Test-DbaBackupInformation | Invoke-DbaAdvancedRestore

Read more

New-DbaDbSnapshot

Simone Bizzotto (@niphold)

New-DbaDbSnapshot View Source Simone Bizzotto (@niphold) Windows, Linux, macOS Synopsis Creates database snapshots for point-in-time recovery and testing scenarios Description Creates read-only database snapshots that capture the state of a database at a specific moment in time. Snapshots provide a fast way to revert databases to a previous state without restoring from backup files, making them ideal for pre-maintenance snapshots, testing scenarios, or quick rollback points. The function automatically generates snapshot file names with timestamps and handles the underlying file structure creation.

Read more

Read-DbaBackupHeader

Chrissy LeMaire (@cl), netnerds.net

Read-DbaBackupHeader View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Extracts backup metadata from SQL Server backup files without restoring them Description Uses SQL Server’s RESTORE HEADERONLY functionality to extract detailed metadata from backup files including database name, backup type, creation date, file lists, and backup size information. This lets you validate backups, plan restores, and audit backup inventory without actually performing a restore operation. The function can process full, differential, and transaction log backups from local file systems, network shares, and Azure blob storage.

Read more

Remove-DbaDbBackupRestoreHistory

IJeb Reitsma

Remove-DbaDbBackupRestoreHistory View Source IJeb Reitsma Windows, Linux, macOS Synopsis Removes backup and restore history records from MSDB database to prevent excessive growth Description Removes backup and restore history records from MSDB database tables to prevent them from consuming excessive disk space and degrading performance. Over time, these history tables can grow substantially on busy SQL Server instances with frequent backup operations. Works in two modes: server-level cleanup removes records older than a specified retention period (default 30 days), while database-level cleanup removes the complete backup/restore history for specific databases.

Read more

Restore-DbaDatabase

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

Restore-DbaDatabase View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS Synopsis Restores SQL Server databases from backup files with intelligent backup chain selection and point-in-time recovery. Description Scans backup files and automatically selects the optimal restore sequence to recover databases to a specific point in time. This function handles the complex task of building complete backup chains from full, differential, and transaction log backups, so you don’t have to manually determine which files are needed or in what order to restore them.

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