Im implementing automated log shipping solution, and came accross differential backups. Im interested in this feature, however, the Backup-SqlDatabase documentation has no information about it... Is there a way to specify this option somewhere?
Here's my script so far:
#First, create a 1-time full backup of the the primary instance DB that we are interested in shipping over to the secondary server
Get-SqlDatabase -ServerInstance $PrimaryServerInstance -Database $DatabaseName | Backup-SqlDatabase -BackupFile "$BackupFilePath\$DatabaseName.bak"
#Restore the full .bak 1-time
Restore-SqlDatabase -ServerInstance $SecondaryServerInstance -Database $DatabaseName -BackupFile "$BackupFilePath\$DatabaseName.bak" -AutoRelocateFile -NoRecovery -PassThru
#Then, create a backup of the the primary instance DB transaction log that we are interested in shipping over to the secondary server
Get-SqlDatabase -ServerInstance $PrimaryServerInstance -Database $DatabaseName | Backup-SqlDatabase -BackupFile "$BackupFilePath\$DatabaseName.trn" -BackupAction Log
#Next, restore the transaction log for the DB on the secondary server/instance (scheduled at some point)
Restore-SqlDatabase -ServerInstance $SecondaryServerInstance -Database $DatabaseName -BackupFile "$BackupFilePath\$DatabaseName.trn" -RestoreAction Log

