Add scheduled task XML
This commit is contained in:
BIN
Update Rubrik.xml
Normal file
BIN
Update Rubrik.xml
Normal file
Binary file not shown.
@@ -1,7 +1,13 @@
|
||||
#
|
||||
# backup.ps1
|
||||
#
|
||||
# TODO: Update cleanup time based on backup type
|
||||
|
||||
|
||||
$sqlInstance = "sqlfcsql\TESTINST"
|
||||
#$directory = "H:\Backup"
|
||||
$directory = "C:\Rubrik\mount"
|
||||
$fullBackupDay = 'Wednesday'
|
||||
$fullBackupDay = 'Tuesday'
|
||||
$cleanupTime = 24
|
||||
$checkCluster = $false
|
||||
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
##########################################################################
|
||||
#
|
||||
# On Demand Snapshot for all Oracle DBs with a specific SLA
|
||||
# Created by Rubrik PS for McDermott, September 2025
|
||||
# Update an SLA MV to point to the local host
|
||||
# Created by Rubrik PS for ZF, September 2025
|
||||
#
|
||||
# Must be run with a Global service account.
|
||||
#
|
||||
# Requires RubrikSecurityCloud module to be installed and working with
|
||||
# a Global Service Account with the following rights:
|
||||
#
|
||||
# - Data Management / Oracle / On-Demand Snapshot
|
||||
# - Data Management / SLAs / Both Source and Target SLAs
|
||||
# a Global Service Account with the following rights (TBC)
|
||||
#
|
||||
# Create the service account file with:
|
||||
# Set-RscServiceAccountFile sa.json -OutputFilePath Global.xml
|
||||
#
|
||||
# Example invocation
|
||||
# .\monthlySnap.ps1 -sourceSla "Prod Oracle SLA" -triggerSla "Oracle Monthly Only"
|
||||
# .\claimInstance.ps1 -sqlInstance "sqlfcsql\TESTINST" -mvName "JP-ZF-SQL"
|
||||
#
|
||||
# v0.1 Initial Release
|
||||
#
|
||||
@@ -24,7 +21,7 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$False,
|
||||
HelpMessage="Instance to claim")]
|
||||
[string]$sourceSla,
|
||||
[string]$sqlInstance,
|
||||
|
||||
[Parameter(Mandatory=$False,
|
||||
HelpMessage="Do not change the MV")]
|
||||
@@ -47,7 +44,7 @@ $ErrorActionPreference = 'Stop'
|
||||
function Write-Log($message) {
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
$logEntry = "$timestamp $message"
|
||||
Add-Content -Path "C:\Rubrik\monthlySnap.log" -Value $logEntry
|
||||
Add-Content -Path $logFile -Value $logEntry
|
||||
Write-Host $logEntry
|
||||
}
|
||||
|
||||
@@ -103,7 +100,7 @@ if ($myHost.Id -ne $mvDetail.hostDetail.Id) {
|
||||
$query.Var.input.Id = $mvDetail.Id
|
||||
$query.Var.input.update.Name = $mvName
|
||||
$query.Var.input.update.config.SmbDomainName = $mvDetail.SmbShare.DomainName
|
||||
$query.Var.input.update.config.SmbValidIps = $mvDetail.SmbShare.ValidIps
|
||||
$query.Var.input.update.config.SmbValidIps = $myHost.Name
|
||||
$query.Var.input.update.config.SmbValidUsers = $mvDetail.SmbShare.ValidUsers + $mvDetail.SmbShare.ActiveDirectoryGroups
|
||||
$query.Var.input.update.slaClientConfig.clientHostId = $myHost.Id
|
||||
$query.Var.input.update.slaClientConfig.channelHostMountPaths = $mvDetail.ClientConfig.ChannelHostMountPaths
|
||||
|
||||
2
failover.cmd
Normal file
2
failover.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"C:\Program Files\PowerShell\7\pwsh.exe" -ExecutionPolicy Bypass -File "%~dp0claimInstance.ps1"
|
||||
Reference in New Issue
Block a user