I'm not sure if we're even starting in the right place.
We're trying to build 'reverse replica jobs' from the Get-VBRJob command so that we can put everything into variables and essentially create a mirror of the jobs we have. The reason is because we're moving datacenters, and while we can failover temporarily with no problem we would need to move into the other DR datacenter for a few weeks before failing back to the new production Datacenter. We can't run on snapshots for that long so we would need to do a permanent failover.
We would therefore need to take our existing jobs going from Site A to Site B and create mirrors of them to begin replicating everything from B back to A since you can't 'undo' a permanent failover by design.
Because of the number of jobs and objects in the jobs, we want to do this all through powershell.
We've gotten as far as using a Foreach statement in the script to run things like Get-VBRJob -name $name against things like Get-VBRJobObject and then another statement within that to get the VSS settings for individual machines.
On the subject of the VSS options for individual machines, the output of the .vssoptions section yeilds something like this which, I'm not sure we can use when it comes to re-creating the jobs. (By use, I mean call this part of the variable and use it as an input when creating a job)
- Code: Select all
VssSnapshotOptions: [Enabled: [True], IgnoreErrors: [True], IsCopyOnly: [True]],
WinGuestFSIndexingOptions: [Type: [None]], LinGuestFSIndexingOptions: [Type: [None]],
SqlBackupOptions: [TransactionLogsProcessing: [NeverTruncate], BackupLogsFrequencyMin: ,
UseDbBackupRetention: [True], RetainDays: , ProxyAutoSelect: [True]], ExchangeBackupOptions:
[TransactionLogsProcessing: [TruncateOnlyOnSuccessJob]], WinCredsId:
[00000000-0000-0000-0000-000000000000], LinCredsId: [00000000-0000-0000-0000-000000000000], Old
Properties: [Enabled: [True], IgnoreErrors: [True], GuestFSIndexingType: [None],
IncludedIndexingFolders: , ExcludedIndexingFolders: [%windir%; %ProgramFiles%; %TEMP%],
LinGuestFSIndexingType: [None], LinIncludedIndexingFolders: , LinExcludedIndexingFolders: ,
We haven't got a problem with nesting foreach statements inside statements to get all the information. The problem comes with getting the rest of the relevant information.
Get-VBRJob proxy only lists one of the procies involved in a replica job. It doesn't list the proxy used in our secondary site
I can't find anything on how to get the Re-IP rules, nor the Network-Remapping either.
The hope was to be able to take each and every one of these items, throw it into a variable and then run a script to create the exact opposite.
The other hope and expectation was that this would be a one liner, but it seems like it's going to turn into a monster of a script. We've been banging our heads against a brick wall but there doesn't seem to be any one single command that lists a job, it's objects and their VSS options, the source and target proxies, the data repository for the metadata, the re-ip rule, and the network re-map rule, and the replica seeding / map to existing virtual machine rule.
If we could get all of those then we could easily flip them!