Restore Doc
This commit is contained in:
@@ -0,0 +1,70 @@
|
|||||||
|
RestoreScript Quick Usage
|
||||||
|
|
||||||
|
This is a simple quick-reference for common restore operations with RestoreScript.ps1.
|
||||||
|
|
||||||
|
Recommended flow
|
||||||
|
|
||||||
|
0) Perform a Live Mount of the desired snapshot to the target server
|
||||||
|
|
||||||
|
Make sure all channels are mounted under a common root, e.g:
|
||||||
|
|
||||||
|
D:\Rubrik\lm\0
|
||||||
|
D:\Rubrik\lm\1
|
||||||
|
|
||||||
|
1) Catalog backups first (not NEEDED but a good start point)
|
||||||
|
|
||||||
|
List databases discovered in backup files:
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action catalog
|
||||||
|
|
||||||
|
List one specific database from catalog:
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action catalog -DatabaseName DataAW1
|
||||||
|
|
||||||
|
2) Verify backup headers/chains
|
||||||
|
|
||||||
|
Verify one database:
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action verify -DatabaseName DataAW1
|
||||||
|
|
||||||
|
3) Restore
|
||||||
|
|
||||||
|
Basic restore syntax
|
||||||
|
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action restore -DatabaseName DataAW1 -DataPath F:\Data -LogPath G:\Logs
|
||||||
|
|
||||||
|
Required for restore:
|
||||||
|
- -SqlInstance
|
||||||
|
- -LiveMountRoot
|
||||||
|
- -Action restore
|
||||||
|
- -DatabaseName (source DB in catalog)
|
||||||
|
- -DataPath
|
||||||
|
- -LogPath
|
||||||
|
|
||||||
|
Normal restore (latest available point)
|
||||||
|
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action restore -DatabaseName DataAW1 -DataPath F:\Data -LogPath G:\Logs
|
||||||
|
|
||||||
|
What it does:
|
||||||
|
- Selects latest usable FULL
|
||||||
|
- Applies latest compatible DIFF (if available)
|
||||||
|
- Applies available LOG backups (if any)
|
||||||
|
- Recovers database
|
||||||
|
|
||||||
|
Point-in-time restore (StopAtTime)
|
||||||
|
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action restore -DatabaseName DataAW1 -DataPath F:\Data -LogPath G:\Logs -StopAtTime "2026-04-10 17:30:00"
|
||||||
|
|
||||||
|
Tips:
|
||||||
|
- Use local SQL Server time format: yyyy-MM-dd HH:mm:ss
|
||||||
|
- StopAtTime and StopAtLSN are mutually exclusive (use only one)
|
||||||
|
|
||||||
|
Restore and rename target database
|
||||||
|
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action restore -DatabaseName DataAW1 -NewName CloneRbk_DataAW1 -DataPath F:\Data -LogPath G:\Logs
|
||||||
|
|
||||||
|
What it does:
|
||||||
|
- Restores source backup chain from DataAW1
|
||||||
|
- Creates target DB as CloneRbk_DataAW1
|
||||||
|
- Renames physical files to avoid collisions with source DB files
|
||||||
|
|
||||||
|
Optional: Preview restore plan only (no restore execution)
|
||||||
|
|
||||||
|
.\RestoreScript.ps1 -SqlInstance SQLFC1\SQLFC1P -LiveMountRoot C:\Rubrik\lm\ -Action restore -DatabaseName DataAW1 -NewName CloneRbk_DataAW1 -DataPath F:\Data -LogPath G:\Logs -StopAtTime "2026-04-10 17:30:00" -PreviewRestorePlan
|
||||||
Reference in New Issue
Block a user