Skip to content

Instantly share code, notes, and snippets.

@Stuart-Moore
Created November 25, 2017 23:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stuart-Moore/5bef59595e931507e2f4ce64a1fa1307 to your computer and use it in GitHub Desktop.
Save Stuart-Moore/5bef59595e931507e2f4ce64a1fa1307 to your computer and use it in GitHub Desktop.
Rebasing Striped backups
$BackupHistory = Get-DbaBackupHistory -SqlInstance localhost\sqlexpress2016 -Database RestoreTimeStripe
$BackupHistory | ForEach {$_.FullName = $_.FullName |
ForEach {
($_ -replace 'c:\\dbatools\\RestoreTimeStripe\\stripe1','\\new\stripeA') -replace 'c:\\dbatools\\RestoreTimeStripe\\stripe2', '\\old\StripeB'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment