Map Backup Comman

PowerShell script exchange

Map Backup Comman

Veeam Logoby y1008946 » Thu Dec 19, 2013 7:52 am

Hi, I'm trying to create a backup job which maps the backup to a backup file in the repository.

Is there a powershell command to set the map backup stage of the backup job wizard?

Thanks
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby y1008946 » Thu Dec 19, 2013 8:54 am

Not able to edit my original request.

Is it possible to set the 'map backup' location of an existing backup job?

Thanks
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby Vitaliy S. » Thu Dec 19, 2013 10:01 am

I don't believe re-mapping is required here. Can you please confirm that repository rescan option doesn't update the number of restore points?
Vitaliy S.
Veeam Software
 
Posts: 19557
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Map Backup Comman

Veeam Logoby y1008946 » Thu Dec 19, 2013 10:39 am

Hi, just to confirm the steps I have done to test it.

- run a backup job

- run the corresponding backup copy job to send the backup to the offsite server

- rescanned the repository

The dummy backup job doesnt reflect the new restore point though.

Thanks Vitaliy
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby y1008946 » Thu Dec 19, 2013 12:36 pm

Hi Vitaliy, i've spent some time testing and tried it a few times. The steps I have found need to be carried out to update the restore points are:

- remove the vm from application group

- delete the backup from Backups -> Disk

- rescan the repository

- it adds the backup into Backups -> Imported

- in the dummy backup job map the backup to the imported backup

- add the dummy backup in to the application group

The steps do take a while to carry out. I dont know if there is a way to create a powershell script for them?

Thanks
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby Vitaliy S. » Thu Dec 19, 2013 4:51 pm

Daniel,

Our QC team has tried to reproduce various scenarios of using backup copy and SureBackup jobs and here is the result.

Please be aware that this method is officially not supported, as you need to verify your backup prior sending them to the offsite location. Here you go the instructions on how to make it work:

1. Install Veeam B&R console on the site used as a target for the backup copy job
2. Create and add backup repository where backup copy job stores its files.
NOTE: repository type cannot be CIFS share.
3. Run a rescan job to populate backup console with backup copy job files.
4. Add ESXi host you want to start SureBackup jobs on
5. Create SB virtual lab
6. Create application group by adding VMs from the rescanned repository.

PS command example:
Code: Select all
Add-VSBViApplicationGroup –Name “AG” –RestorePoint (Get-VBRRestorePoint -Name <VM_Name>)

7. Create SureBackup job with this application group via GUI.
8. Prior starting the SB job, run a rescan job on demand using this cmdlet:
Code: Select all
Sync-VBRBackupRepository -Repository (Get-VBRBackupRepository -Name <Repository_name>)

9. Start SureBackup job.
NOTE: Make sure backup copy job is idle state, otherwise your SB job will fail.

P.S. Kudos to Nikita for these guidelines.
Vitaliy S.
Veeam Software
 
Posts: 19557
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Map Backup Comman

Veeam Logoby y1008946 » Sat Dec 21, 2013 10:46 pm

Hi, thanks for this its great.

It hasnt worked for me though unfortunately.

I have tried quite a few times and what I have found is that the imported backups do update in the repository.

But when running the surebackup job the restore points dont update...

So for example:

- I create a backup of a VM at 10:00 and copy it offsite

- create an application goup and surebackup job in the offsite server

- run the surebackup job and it says the restore point is from 10:00. Surebackup job is a success.

- I create another backup of the same VM at 12:00 and copy it offsite

- rescan the repository in the offsite server. In the imported backups of the offsite server it correctly shows the last two restore points are 12:00 and 10:00.

- I run the surebackup job and it says the restore point is from 10:00.

The only way I have found which works is to remve the surebackup job and the application group, then re-add them :?

Do you not find the same thing?

Thanks very much
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby Vitaliy S. » Sun Dec 22, 2013 9:49 am

Did you create any mapping jobs? If this is the case then you don't need to do that.
Vitaliy S.
Veeam Software
 
Posts: 19557
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Map Backup Comman

Veeam Logoby v.Eremin » Sun Dec 22, 2013 12:49 pm

I run the surebackup job and it says the restore point is from 10:00

Also, have you tried to use "Start to" option? Does it make any difference? Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Map Backup Comman

Veeam Logoby y1008946 » Sun Dec 22, 2013 8:53 pm

Hi, I've tried t again and it seems to be working!

Thanks for all your help it works great!


I think the key was in how to create the application group using powershell.

When I started originally I was using a similar way, the powershell command created the application group but it didnt update the restore points each day. This is the powershell command I had used:

Code: Select all
$ibfOibs = (Get-VBRBackup -Name "DC01 Backup Copy to Offsite").GetLastBackupOibs()
Add-VSBApplicationGroup -Name "Test App Group" -RestorePoint $ibfOibs
y1008946
Enthusiast
 
Posts: 86
Liked: never
Joined: Mon Sep 23, 2013 3:56 pm

Re: Map Backup Comman

Veeam Logoby v.Eremin » Sun Dec 22, 2013 9:01 pm

Glad to hear that now everything works fine. Feel free to ask, if any additional help is needed. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Map Backup Comman

Veeam Logoby OmiFreak » Tue Jul 14, 2015 9:46 am

Hi,

I also try to use a copy job as source for a SureBackup. I tried the powershell command above but get some errors:

Add-VSBViApplicationGroup –Name “FSR_DEERL” –RestorePoint (Get-VBRRestorePoint -Name emma)


Add-VSBViApplicationGroup : Failed to process RestorePoint 61dd428e-2d2d-4a9c-b4de-73c206180b52. Job type BackupSync
is not supported
At line:1 char:1
+ Add-VSBViApplicationGroup –Name “FSR_DEERL” –RestorePoint (Get-VBRRestorePoint - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Add-VSBViApplicationGroup], Exception
+ FullyQualifiedErrorId : AddViApplicationGroupId,Veeam.Backup.PowerShell.Command.AddVSBViApplicationGroup


If I try this command:
$ibfOibs = (Get-VBRBackup -Name "DE-ERL_copy").GetLastBackupOibs()

I get:
Method invocation failed because [Veeam.Backup.Core.CBackup] does not contain a method named 'GetLastBackupOibs'.
At line:1 char:1
+ $ibfOibs = (Get-VBRBackup -Name "DE-ERL_copy").GetLastBackupOibs()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound


I replicate the branch office backup to our headquarter and should verify here some things, verify at the original location is not a option.

Regards,
Bernd
OmiFreak
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Apr 26, 2011 4:11 pm
Full Name: Bernd Flatz

Re: Map Backup Comman

Veeam Logoby v.Eremin » Tue Jul 14, 2015 11:59 am

If you're willing to verify backups created by backup copy jobs, kindly, stick to the approach described here. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Map Backup Comman

Veeam Logoby OmiFreak » Wed Jul 15, 2015 12:24 pm

Thank you for the link but this is the approach from Vitaliy I tried (is also on this site).

I think the problem in my case is that I have only one Veeam Backup Server world-wide.
This server is already at the site I want to make the verify.
The backup is from a branch office where I only have a backup proxy installed.
If I now create the application pool with this powershell command:
Add-VSBViApplicationGroup –Name “AG” –RestorePoint (Get-VBRRestorePoint -Name <VM_Name>)
It tries to add every restore point it finds for this VM, from Tape jobs and from the original backup job, which is managed from this backup server as well.
The SureBackup job tries to use then the normal backup job restore point from the WAN location.

Regards,
Bernd
OmiFreak
Influencer
 
Posts: 15
Liked: 2 times
Joined: Tue Apr 26, 2011 4:11 pm
Full Name: Bernd Flatz

Re: Map Backup Comman

Veeam Logoby v.Eremin » Wed Jul 15, 2015 1:33 pm

Not sure whether it helps, but you can try to create dummy backup jobs, map them on the files created by backup copy jobs, and then create SureBackup jobs, using the dummy ones. Before running surebackup jobs, you might want to disable backup copy ones temporarily.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Next

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests