Backup-DbaDatabase View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Copy-DbaDatabase View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Format-DbaBackupInformation View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram)
Get-DbaBackupInformation View Source Chrissy LeMaire (@cl) , Stuart Moore (@napalmgram) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Get-DbaDbRestoreHistory View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Invoke-DbaAdvancedRestore View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
New-DbaDbSnapshot View Source Simone Bizzotto (@niphold) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Read-DbaBackupHeader View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Remove-DbaDbBackupRestoreHistory View Source IJeb Reitsma Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.
Restore-DbaDatabase View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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,