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.
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.
Chrissy LeMaire (@cl) | Stuart Moore (@napalmgram)
Get-DbaDbBackupHistory View Source Chrissy LeMaire (@cl) , Stuart Moore (@napalmgram) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves backup history records from MSDB for analysis and compliance reporting.
Description Queries the MSDB database backup tables to extract detailed backup history information including file paths, sizes, compression ratios, and LSN sequences. Essential for compliance auditing, disaster recovery planning, and troubleshooting backup issues without having to manually query system tables.
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.
Get-DbaLastBackup View Source Klaas Vandenberghe (@PowerDBAKlaas) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves last backup dates and times for database backup compliance monitoring
Description Queries msdb backup history to retrieve the most recent full, differential, and transaction log backup dates for each database. This function helps DBAs quickly identify backup gaps and verify compliance with backup policies by showing when each backup type was last performed.
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-DbaBackup View Source Chris Sommer (@cjsommer), www.cjsommer.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Removes SQL Server backup files from disk based on retention policies and file extension criteria.
Description Recursively searches backup directories and removes SQL Server backup files older than your specified retention period. This function automates the tedious process of manually cleaning up old backup files to free disk space and maintain storage compliance.
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,
Test-DbaBackupInformation View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs 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.