Host-based backup of VMware vSphere VMs.
Post Reply
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

vCenter and Veeam replication to DR site

Post by rogerdu »

I've checked through this forum for these topics and while there is information it mostly applies to older versions...

Site A
vCenter server 6.0 U2 (embedded PSC). 2x ESXi servers , 15 VMs
Veeam Server, Veeam proxy

Site B
2 x ESXi servers, 4 VMs
Veeam proxy

Site A replicates to Site B, Site B replicates to Site A.
Both sites have copies of local backups and copies of remote backups

Conundrum: Can I replicate the vCenter server to Site B and "bring it up" then change the IP address? or is this a 6.5 only thing? I've read that changing the IP on 6.0 is "difficult"

Conundrum 2: Can I replicate the Veeam server (the master if you will) and just bring it up with a new IP? or is the standard procedure to promote the proxy to a server and restore the configuration backup (which is copied across daily)? then when Site A is back up, demote the proxy...

I'd be interested to hear what others are doing in these instances...

Roger
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

From another post... (vmware-vsphere-f24/replication-but-what ... ml#p120670)

I'm assuming this procedure would be done at my Site B and would apply to the Veeam server only. I would still need some methodology to get the vCenter server across. Also, Site A and Site B have different IP address ranges...

1. start the replicated Veeam backup server manually
2. do other VMs failover using your DR Veeam backup server console (in this case you will be able to automatically run a failback procedure)
3. once source site is up and running, initiate a failback operation for all VMs except backup server
4. replicate latest changes occurred on the DR backup server to the HQ host (via replication jobs and replica mapping functionality)
5. start Veeam backup server on the main site via vSphere Client

P.S. you could avoid steps 1,4,5 if your backup server managing replication jobs was located on the DR site (recommended approach).
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

For the fully automated DR, it is recommended to have Veeam B&R responsible for replication jobs located in the target site ("pull" replication) and point the job replicating vCenter server itself to the ESXi host directly (to be able to failover this particular VM without connection to vCenter in its absense).
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Does this require additional licensing for the second Veeam B&R server? Will this be seperate infrastructure (B&R server and Proxy) just for replication to the remote site? The remote site is performing local backups, backup copies and replication to the main site.

Also, how would this change the backup paradigm? Currently the client is running backups and Backup copies locally as well as a backup copy to the remote site... at both sites... all controlled by the one B&R server. The replication is controlled by the same B&R server. There are 3 schedules... hourly and every 4 hours (from the machine state) and daily from the copied backup copies.

Lastly, replicating the vCenter server will only get the data there... vCenter 6 cannot have its IP address changed... unless my research has been all wrong. I can see automating the backup of the vCenter database then spinning up a new appliance and restoring the database though... (https://kb.vmware.com/selfservice/micro ... Id=2091961)

Roger
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

You could have two Veeam B&R instances, each responsible for it's respective site. That doesn't require additional licensing as long as your license covers all the hosts where you backup/replicate VMs from. You can have the same servers involved as proxies/repositories in both instances, just keep in mind the load aspect (the number of tasks is counted within each instance separately) and provided both instances are at the same patch level. But that is just another option that is available, you can leave everything controlled by a single one, if you want, but have to deal with some manual tasks in case of DR.

As for the IP change, then it might be possible, depending on the particular setup.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

One more question if I may...

You mention the pull for replication... would that also be the case for the Backup Copies? or would that be better served by pushing the copies across?

Right now, some of the replication jobs use the backup copies as a source for the replication (Site B), while other replication jobs occur more often that the backup cycle so use the live data from Site A for its source... I'm assuming that since the same proxy servers are used by both Badkup servers, I can continue to use the remote copies as a source for replication at site B (this would be on the local Long Term repository which was populated by the backup server at Site A)
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

You can set it up the way it would be more convenient for you. The only moment you need to keep in mind, is that the replica job should be created om the same Veeam B&R instance that performs the source backup copy job, otherwise you'd need to perform pre-job rescan of the repository, so that newly created restore points are imported.
lando_uk
Veteran
Posts: 385
Liked: 39 times
Joined: Oct 17, 2013 10:02 am
Full Name: Mark
Location: UK
Contact:

Re: vCenter and Veeam replication to DR site

Post by lando_uk »

So just to get this straight, we can use the same servers and repros on two different instances of VBR? Does the transport engines use different ports or amything? Wont they get confused when upgrading ?

Is there a diagram for such a setup available? this question seems to come up a lot on these forums, you guys should maybe write a white paper of a FAQ detailing all the options for DR.
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

You can have the same servers involved as proxies/repositories in both instances, just keep in mind the load aspect (the number of tasks is counted within each instance separately) and make sure both instances are at the same patch level.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

foggy wrote:... The only moment you need to keep in mind, is that the replica job should be created om the same Veeam B&R instance that performs the source backup copy job, otherwise you'd need to perform pre-job rescan of the repository, so that newly created restore points are imported.
Is there an API command or at least is there a job that can be run at a specific time (say an hour before the morning replication runs) that will rescan the repository?

Must remember to Google this stuff first...... Sync-VBRBackupRepository -Repository $repository (powershell) at https://helpcenter.veeam.com/docs/backu ... tml?ver=95

Methinks I see a scheduled task on my Veeam server soon... :-)
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

Yes, please review another thread discussing similar implementations.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

so if I was to put this into a pre job script, I assume it would be the same format as if I ran it in the Windows Scheduler...
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

Correct.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Question... From this discussion, I believe the script in question would be:

Code: Select all

Add-PSSnapin VeeamPSSnapin
Connect-VBRServer
Get-VBRBackupRepository -name "Production Repository" | Sync-VBRBackupRepository
If I remember the output correctly, this starts the job of Syncing the repository. If I use this as is, will the Sync finish before I run a replication or do I need to query the status of the repository and wait for a "ready" state?

Also, is it the same command for a Scale Out Repository (I'm assuming it doesn't matter if regular or scale out)
foggy
Veeam Software
Posts: 21138
Liked: 2141 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: vCenter and Veeam replication to DR site

Post by foggy »

I believe you should query the operation status prior to starting the next one.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

I looked through the VeeamPSSnapin site... could you suggest a methodology to do so?
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Hmmm... if I execute $sync = Sync-VBRBackupRepository -repository $repo then $sync | Get-Member I get:
TypeName: Veeam.Backup.Core.CBaseSession

Code: Select all

   TypeName: Veeam.Backup.Core.CBaseSession

Name                         MemberType Definition
----                         ---------- ----------
AbortSession                 Method     void AbortSession()
CalcBaseSessionResult        Method     Veeam.Backup.Model.CBaseSessionInfo+EResult CalcBaseSessionResult()
CheckStop                    Method     void CheckStop()
CompleteBase                 Method     void CompleteBase()
CompleteWithFailure          Method     void CompleteWithFailure()
CompleteWithResult           Method     void CompleteWithResult(Veeam.Backup.Model.CBaseSessionInfo+EResult result, ...
CompleteWithSuccess          Method     void CompleteWithSuccess()
CompleteWithWarning          Method     void CompleteWithWarning()
Equals                       Method     bool Equals(System.Object obj)
FindSessionStarterInfo       Method     Veeam.Backup.Model.CSessionStarterInfo FindSessionStarterInfo()
GetHashCode                  Method     int GetHashCode()
GetType                      Method     type GetType()
IsSessionNotHeldByJobProcess Method     bool IsSessionNotHeldByJobProcess()
IsStoped                     Method     bool IsStoped([ref] string stopDetails), bool IsStoped()
LogAndSetOperation           Method     void LogAndSetOperation(string format, Params string[] args)
SetAuxData                   Method     void SetAuxData(string auxData)
SetLeaseId                   Method     void SetLeaseId(guid leaseId)
SetOperation                 Method     void SetOperation(string format, Params System.Object[] args), void SetOpera...
SetProgress                  Method     void SetProgress(int progress)
SetResult                    Method     void SetResult(Veeam.Backup.Model.CBaseSessionInfo+EResult result), void Set...
SetSpec                      Method     void SetSpec(string spec)
SetState                     Method     void SetState(Veeam.Backup.Model.CBaseSessionInfo+EState state), void IBaseS...
ToString                     Method     string ToString()
UpdateSessionStarterInfo     Method     void UpdateSessionStarterInfo(Veeam.Backup.Model.CSessionStarterInfo starter...
AuxData                      Property   string AuxData {get;}
BaseProgress                 Property   int BaseProgress {get;}
CreationTime                 Property   datetime CreationTime {get;}
CreationTimeUTC              Property   datetime CreationTimeUTC {get;}
Description                  Property   string Description {get;}
EndTime                      Property   datetime EndTime {get;}
EndTimeUTC                   Property   datetime EndTimeUTC {get;}
Id                           Property   guid Id {get;}
IsCompleted                  Property   bool IsCompleted {get;}
IsLowerAgentPriority         Property   bool IsLowerAgentPriority {get;}
IsPostprocessing             Property   bool IsPostprocessing {get;}
IsStarting                   Property   bool IsStarting {get;}
IsWorking                    Property   bool IsWorking {get;}
JobId                        Property   guid JobId {get;}
JobName                      Property   string JobName {get;}
JobSpec                      Property   string JobSpec {get;}
JobType                      Property   Veeam.Backup.Model.EDbJobType JobType {get;}
JobTypeString                Property   string JobTypeString {get;}
LeaseId                      Property   guid LeaseId {get;}
Logger                       Property   Veeam.Backup.Core.IXmlLogger Logger {get;}
LogName                      Property   string LogName {get;}
LogsSubFolder                Property   string LogsSubFolder {get;}
Name                         Property   string Name {get;}
Operation                    Property   string Operation {get;}
Result                       Property   Veeam.Backup.Model.CBaseSessionInfo+EResult Result {get;}
SessionInfo                  Property   Veeam.Backup.Model.CBaseSessionInfo SessionInfo {get;}
State                        Property   Veeam.Backup.Model.CBaseSessionInfo+EState State {get;}
Tracer                       Property   Veeam.Backup.Core.ILogTracer Tracer {get;}
Any idea how I would get IsCompleted to update? I'm a PowerShell n00b...
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

OK, so maybe not so n00b... This works... I understand that I'd need to take out the Write-Output "Waiting..." statement

Code: Select all

Add-PSSnapin VeeamPSSnapin
Connect-VBRServer
$repo = Get-VBRBackupRepository -name "Production Repository"
$sync = Sync-VBRBackupRepository -repository $repo

while ( $sync.IsCompleted -ne $True ) {
  start-sleep -s 5
  Write-Output "Waiting..."
  $sync.CheckStop()
   }

Write-Output "Done" $sync.IsCompleted
Disconnect-VBRServer
so if I have a Scaleout repository at my client's site, I would use the -ScaleOut switch as well in the Get-VBRBackupRepository command...
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Well, that didn't work so well... I left this running over night... and it was still running this morning... Suggestions?? how do I get the session to report that it is done?
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: vCenter and Veeam replication to DR site

Post by veremin »

IsCompleted is a static property that gets never updated in your script, thus, the cycle runs infinitely.

Try to utilize isStoped dynamic method instead and see whether it makes any difference.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Do I also have to update the status with CheckStop() ? using IsStoped([ref]$stopDetails) did nothing either...
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: vCenter and Veeam replication to DR site

Post by veremin »

I have tested it briefly and there does not seem to be a way to check the status of sync session dynamically (none of the available method returns anything valuable). So, it might be worth inputting such sleeping interval within which a session can definitely finish, say, 10 minutes or so. Thanks.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Thanks!! I guess instead of doing this as the pre-job script I'll have to do it on the scheduler... the only problem is that I won't have a guaranteed refresh... le sigh...

NEw and improved Windows Scheduler script...

Code: Select all

Add-PSSnapin VeeamPSSnapin
Connect-VBRServer
$repo = Get-VBRBackupRepository -name "Production Repository"
$sync = Sync-VBRBackupRepository -repository $repo
Start-Sleep -s 600
Disconnect-VBRServer
Thanks!

Roger
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: vCenter and Veeam replication to DR site

Post by veremin »

If you do it via Windows Scheduler, sleep interval is not needed - just make a task start ten minutes earlier. :) Thanks.
rogerdu
Expert
Posts: 148
Liked: 11 times
Joined: Aug 20, 2013 1:16 pm
Full Name: Roger Dufour
Contact:

Re: vCenter and Veeam replication to DR site

Post by rogerdu »

Would the Disconnect-VBRServer not stop the Sync?
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: vCenter and Veeam replication to DR site

Post by veremin » 1 person likes this post

Nope, disconnecting PS session doesn't stop commands already placed on a backup server.
Post Reply

Who is online

Users browsing this forum: m.costantino and 71 guests