Im not new to SQL or Powershell, but im going through the example here.
However, I am new to Veeam.
https://helpcenter.veeam.com/backup/pow ... store.html
Need to simply restore one or more db's from a production backup to an instance on a development or test server.
Normally I do this:
- connect to the dev server as my own domain account (i have sysadmin rights)
- copy down the backup from the production server to a folder on the dev server
- set to single user mode
- restore/replace the target db using the backup file
- reset to multiuser mode
So my questions are:
- am I correct, ill need to run the powershell script from the server where Veeam is installed? (or run remote on this server from my workstation?)
- in the example above, what is meant by a "restore point", cant I just get the most recent full backup?
- how can I specify the restore to use my domain credentials, seeing as myself or anyone running a powershell script to do this will likely also be a sysadmin on sql
- will sql credentials also be required even if im wanting to do this in the context my my domain account?
- regarding both credential(s) questions, can I just specify "my_domain\my_login" in both to get both credential types?
So a "complete" script might be something like this, assuming I get the "restore point" part figured out, also I dont care about specific point in time, just the previous day's full backup.
So maybe, Ill need a step that gets that?
Code: Select all
$crmdb = Get-VBRApplicationRestorePoint -SQL -Name "CRM-db" | Sort -Descending | Select -First 1
$guestcreds = Get-VBRCredentials -Name "domain\name"
$sqlcreds = Get-VBRCredentials -Name "domain\name"
$target-server = "DEV-SERVER1"
Start-VBRSQLDatabaseRestore -Database $locations -ServerName $target-server -GuestCredentials $guestcreds -SqlCredentials $sqlcreds -ToPointInTime "10/28/2015 12:33:39 PM"