PowerShell script exchange
Post Reply
DiscusSystems
Novice
Posts: 3
Liked: never
Joined: Feb 11, 2014 7:12 am
Full Name: DSP
Contact:

Creating VBM from scratch

Post by DiscusSystems » Feb 11, 2014 7:40 am

Hello All,

Can anyone help me with re-creating our VBM files using the powerscript from VpowerCLI? (http://www.vpowercli.co.uk/2011/12/29/c ... m-scratch/)

I appreciate this isn't a Veeam product however after speaking to support yesterday they have told me that we cannot recover from our backups unless we have a valid VBM file.

I have a number of monthly drives which we copy VBK files off to, we also have a few associated VBM files however a few of these files (VBM) have been removed from the drive and therefore we cannot restore.

When trying to import the backup file (VBM) to the script GUI from VpowerCLI I receive an error;

Code: Select all

PS C:\Users\*username*> C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1

GAC    Version        Location
---    -------        --------
True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Wind...
Cannot convert argument "0", with value: "System.Object[]", for "GenerateMeta"
to type "Veeam.Backup.Core.CBackup": "Cannot convert the "System.Object[]" valu
e of type "System.Object[]" to type "Veeam.Backup.Core.CBackup"."
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:43 char:71
+         $Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta <<<< (
$Backup)
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

You cannot call a method on a null-valued expression.
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:44 char:24
+         $Data.Serialize <<<< () | Out-File $VBMFile
    + CategoryInfo          : InvalidOperation: (Serialize:String) [], Runtime
   Exception
    + FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "Load" with "1" argument(s): "Could not find file '\\192.168.
200.217\share\Non-Critical\Non-Critical Backup.vbm'."
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:46 char:18
+         $xml.Load <<<< ($VBMFile)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Property 'JobName' cannot be found on this object; make sure it exists and is s
ettable.
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:47 char:25
+         $xml.BackupMeta. <<<< JobName = $JobName
    + CategoryInfo          : InvalidOperation: (JobName:String) [], RuntimeEx
   ception
    + FullyQualifiedErrorId : PropertyNotFound

Exception calling "Save" with "1" argument(s): "Invalid XML document. The docum
ent does not have a root element."
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:48 char:18
+         $xml.Save <<<< ($VBMFile)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

New-Object : Cannot find type [Veeam.Backup.Core.CBackupRepositoryImporter]: ma
ke sure the assembly containing this type is loaded.
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:53 char:37
+         $TempRepository = New-Object <<<<  Veeam.Backup.Core.CBackupRepositor
yImporter -ArgumentList $Repository, 0
    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentExcepti
   on
    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewOb
   jectCommand

You cannot call a method on a null-valued expression.
At C:\Users\*username*\Desktop\VeeamPSSnapIn.ps1:54 char:31
+         $TempRepository.Import <<<< ()
    + CategoryInfo          : InvalidOperation: (Import:String) [], RuntimeExc
   eption
    + FullyQualifiedErrorId : InvokeMethodOnNull
Can anyone advise of what we can do to get around this issue?

many thanks
Discus

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

Re: Creating VBM from scratch

Post by veremin » Feb 11, 2014 9:23 am

They have told me that we cannot recover from our backups unless we have a valid VBM file.
Hmmm, actually, as long as, you have full backup file, it can be imported to the backup console, and you will be able to restore either files or VMs from it. May I ask you to provide your ticket number here?

Anyway, you can try to import corresponding full backup to backup console and see whether it helps or not. It can be done by right-clicking "Backups" node -> Import backup -> backup file.

Thanks,

tsightler
VP, Product Management
Posts: 5454
Liked: 2270 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Creating VBM from scratch

Post by tsightler » Feb 11, 2014 1:12 pm

Indeed, having a VBM file is not required to be able to restore files or VMs, as a matter of fact, the script referenced above, as well as the one that I post below, use this fact to create VBM files from scratch. For my simple script below you use the Veeam GUI to import the VBK, set the variables in the script (backup name) and the run it. It uses an internal function call to create the VBM XML data, make a minor modification to the JobName and then writes it the data out to the VBM. If you have only the VBK file you must use the "Import" button to browse and locate the VBK file and have it imported into Veeam, but it should work with no problem.

Creating a VBM can sometimes be useful. One common use for me is to create a seed for backup copy jobs from a "normal" backup chain. Normally a backup copy job must be seeded from a single restore points/VBK file which prevents you from using an existing backup chain for a seed since these almost always have multiple chains, however, using this script you can grab just the most recent VBK from an existing backup chain, import it, run the script to create a VBM, and then combine them to use as a seed for a BCJ.

Anyway, just in case it is needed here is the script that I use to create VBM files from scratch. It's basically a modified versions of the script referenced above, but much simpler as I removed the GUI and the automatic import of the VBK, you can just use the Veeam GUI for those steps. The script creates the VBM file on the current users Desktop, but that's easy to change to any path. After running the script you can place the VBK and the newly created VBM file in any repository. Since it now has an appropriate VBM file a simple rescan of the repo will cause it to show up in the GUI and it can now be used for mapping backup or backup copy jobs.

Code: Select all

asnp "VeeamPSSnapIn" -ErrorAction SilentlyContinue

$BackupName = "<Name of Imported Backup>"
$Backup = Get-VBRBackup -Name ($BackupName + "_imported")
$VBMFile = "$env:UserProfile\Desktop\" + "$BackupName" + ".vbm"

$Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta($Backup)
$Data.Serialize() | Out-File $VBMFile
$xml = New-Object XML
$xml.Load($VBMFile)
$xml.BackupMeta.JobName = $BackupName
$xml.Save($VBMFile)
Remove-VBRBackup -Backup $Backup -Confirm:$false

DiscusSystems
Novice
Posts: 3
Liked: never
Joined: Feb 11, 2014 7:12 am
Full Name: DSP
Contact:

Re: Creating VBM from scratch

Post by DiscusSystems » Feb 11, 2014 1:56 pm

v.Eremin wrote: Hmmm, actually, as long as, you have full backup file, it can be imported to the backup console, and you will be able to restore either files or VMs from it. May I ask you to provide your ticket number here?

Anyway, you can try to import corresponding full backup to backup console and see whether it helps or not. It can be done by right-clicking "Backups" node -> Import backup -> backup file.

Thanks,
Case 00511507 [ ref:_00D30RWR._50060Wm0W9:ref ]

The file will not import into the backup console using the import feature.. it seems to appear to have worked then nothing appears in the imported backups. When we spoke to Veeam support they said that without a valid VBM file we could not import.

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

Re: Creating VBM from scratch

Post by veremin » Feb 11, 2014 3:01 pm

In order to be completely sure - What is the type of the file you're trying to import?

I've taken a brief look at your case, and it seems to be concerned mostly with .vrb file, not .vbm one.
Here's a summary of our webex session with your colleague: we added the shared folder with backups as a repository and imported the backup successfuly. However, from the imported .vbk you are able to restore only to the most recent state. If you want to restore to a previous point in time, you need to have a corresponding .vrb (rollback) file in the same folder.
Thanks.

DiscusSystems
Novice
Posts: 3
Liked: never
Joined: Feb 11, 2014 7:12 am
Full Name: DSP
Contact:

Re: Creating VBM from scratch

Post by DiscusSystems » Feb 11, 2014 3:27 pm

Ok... Can someone please call me so we can discuss this on the phone instead?

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

Re: Creating VBM from scratch

Post by veremin » Feb 11, 2014 3:41 pm

You can clarify the situation regarding "import" functionality with the support team within the existing case.

Thanks.

nathanael.duke
Influencer
Posts: 10
Liked: 3 times
Joined: Apr 28, 2014 4:28 pm
Full Name: Nathanael JonCroft Duke
Contact:

Re: Creating VBM from scratch

Post by nathanael.duke » Aug 11, 2014 10:47 pm 1 person likes this post

I've seen this powershell script around. Posting it here for informational purposes.

Code: Select all

Add-PsSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue
[reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
#Textfield Progress
$Progress = New-Object Windows.Forms.Label
$Progress.Text = "Progress: None"
$Progress.Location = New-Object Drawing.Point 64, 50
$Progress.Size = New-Object Drawing.Point 200, 100
 
#Button Setup
$Button = New-Object Windows.Forms.Button
$Button.text = "Import"
$Button.Location = New-Object Drawing.Point 65, 25
 
$Button.add_click(
{
    #Open Dialog Setup
    $Dialog = New-Object Windows.Forms.OpenFileDialog
    $Dialog.InitialDirectory = "C:\\"
    $Dialog.Filter = "VBK Files (*.vbk)|*.vbk"
    $Dialog.ShowHelp = $true
    $Dialog.ShowDialog()
    $Dialog.FileName -match "(?:.*\\)+(.+?)\d\d\d\d-\d\d-\d\dT\d\d\d\d\d\d\.vbk"
 
    #Veeam Setup
    $JobName = $Matches[1]
    $VeeamBox = Get-VBRLocalhost
    $Progress.Text = "Progress: Importing Backup"
    $FileName = $Dialog.FileName
    $Path = [System.IO.Path]::GetDirectoryName($Dialog.FileName)
    $VBMFile = $Path + "\" + $JobName + ".vbm"
    if(!([System.IO.File]::Exists($VBMFile)))
    {
        if(!(Get-VBRBackup -Name $JobName))
        {
            Import-VBRBackup -Server $VeeamBox -FileName $FileName
            $Backup = Get-VBRBackup -Name ($JobName + "_imported")
        }
        else
        {
            $Backup = Get-VBRBackup -Name $JobName
        }
        $Progress.Text = "Progress: Creating VBM File"
        $Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta($Backup)
        $Data.Serialize() | Out-File $VBMFile
        $xml = New-Object XML
        $xml.Load($VBMFile)
        $xml.BackupMeta.JobName = $JobName
        $xml.Save($VBMFile)
        $Progress.Text = "Progress: Clean Up"
        Remove-VBRBackup -Backup $Backup -Confirm:$false
        $Progress.Text = "Progress: Repo Discovery"
        $Repository = Get-VBRBackupRepository | ?{$_.path -eq $Path}
        $TempRepository = New-Object Veeam.Backup.Core.CBackupRepositoryImporter -ArgumentList $Repository, 0
        $TempRepository.Import()
        $Progress.Text = "Progress: Finished"
 
    }
    else
    {
        $Progress.Text = "Failed: VBM Exists"
    }
})
 
#Form Setup
$Form = New-Object Windows.Forms.Form
$Form.Size = New-Object Drawing.Point 220,100
$Form.Text = "VBM Create"
$Form.Controls.Add($Button)
$Form.Controls.Add($Progress)
$Form.FormBorderStyle = "FixedDialog"
$Form.MaximizeBox = $false;
$Form.ShowDialog()

ThomasMc
Expert
Posts: 293
Liked: 17 times
Joined: Apr 13, 2011 12:45 pm
Full Name: Thomas McConnell
Contact:

Re: Creating VBM from scratch

Post by ThomasMc » Aug 23, 2014 10:35 am

No real point in c&p the script as he linked to it already and if you must, at least give Seth some credit ;)

hdang
Novice
Posts: 3
Liked: never
Joined: Mar 31, 2015 4:35 pm
Full Name: Henry Dang
Contact:

Re: Creating VBM from scratch

Post by hdang » Mar 31, 2015 4:38 pm

Hi,
When I tried to runt he script I get an error.

PS C:\Users\*****> $Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMet
a($Backup)
Exception calling "GenerateMeta" with "1" argument(s): "Full storage not found"
At line:1 char:1
+ $Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta($Backup)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Exception

Any suggestion? I should also note that I tried this on another backup chain and it worked. Not sure what is causing this to failed.

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

Re: Creating VBM from scratch

Post by veremin » Mar 31, 2015 5:18 pm

Hi, Henry, which product version you're trying the script at? Is it version 8, by any chance?

If so, please, open a ticket with our support team, they have a script for re-creating .vbm file which is compatible with version 8. Once the case is opened, kindly, provide its number here, so that, I can follow it.

Thanks.

hdang
Novice
Posts: 3
Liked: never
Joined: Mar 31, 2015 4:35 pm
Full Name: Henry Dang
Contact:

Re: Creating VBM from scratch

Post by hdang » Mar 31, 2015 6:28 pm

Hi,
No it is not version 8. We are still on version 7, but have plans to upgrade to version 8 in the near future.
I'm not sure why the script is not working for this job as it did for another. I do have a case open, though, the support personnel said you guys don't provide the script nor they can re-create the .vbm file...

Case #00867329

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

Re: Creating VBM from scratch

Post by veremin » Apr 01, 2015 12:06 pm

Thank you for posting your ticket number. I'll see what can be done in this regard and update the topic, once I have more information.

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

Re: Creating VBM from scratch

Post by veremin » Apr 01, 2015 3:14 pm

For version 7 the script provided here should work fine. So, I'm not sure why it's not working on a particular job.

Anyway, we've contacted your support engineer and make him aware of existence of scripts for version 8; will see what happens next.

Thanks.

tsightler
VP, Product Management
Posts: 5454
Liked: 2270 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Creating VBM from scratch

Post by tsightler » Apr 01, 2015 3:26 pm

For version 7 the script provided here should work fine. So, I'm not sure why it's not working on a particular job.
Which is just a reposting of my version of this script (based heavily on Seth's original) from a few post up in this thread.

warpconduit
Lurker
Posts: 1
Liked: 1 time
Joined: Jul 19, 2015 1:40 am
Full Name: Josh Hartman
Contact:

Re: Creating VBM from scratch

Post by warpconduit » Jul 19, 2015 9:07 pm 1 person likes this post

I wanted to add a note as to what steps worked for me on Veeam Backup & Replication version 8 when transforms were failing and I needed to remove all VRBs and VIBs from a backup to free disk space:
  1. Open Veeam, go to Backups > Disk, right-click on the backup and select "Remove from backups" (leaves the files on disk)
  2. Use Windows Explorer to navigate to the backup's repository on disk, delete all files except your most recent VBK
  3. Return to Veeam, right-click on Backups and select "Import backup..." and import the VBK
  4. From the Veeam main menu select PowerShell
    Note: If you don't have the PowerShell menu item then you need to install the Veeam PowerShell module from your installation media (X:\Backup\BPS_x64.msi)
  5. Issue the following commands, replacing OriginalName with your original backup name:

    Code: Select all

    $BackupName = "OriginalName"
    $Backup = Get-VBRBackup -Name ($BackupName + "_imported")
    $Job = Get-VBRJob -Name "$BackupName"
    $Backup.Update($Job)
    
  6. Return to Backups in Veeam and you should see the backup renamed and no longer in the "imported" section
  7. Now, edit the associated job, go to the Storage section and re-map it to the backup, Finish to save changes
After these steps I ran the backup job and it created a new VIB and then transformed a new VBK & VRB without any issues (I'm using Incremental backup mode with periodic synthetic fulls). Hope it helps someone else.

Brad.Morris
Enthusiast
Posts: 43
Liked: 2 times
Joined: Sep 01, 2014 10:29 pm
Full Name: Brad Morris
Location: Melbourne, Australia
Contact:

Re: Creating VBM from scratch

Post by Brad.Morris » Feb 17, 2016 10:39 pm

Hi there,

I have not had any luck with any of the scripts listed here :(

I am running V8 Update 3.

Can someone post a working script that will create a VBM file from imported VBK files please.

albertwt
Expert
Posts: 641
Liked: 20 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Re: Creating VBM from scratch

Post by albertwt » Jun 30, 2016 11:34 pm 1 person likes this post

This is the updated Powershell script that I have been given during my past interaction with the support team:

Code: Select all

#	[Veeam.Backup.Core.CCredentilasStroreInitializer]::InitLocal() to work with Lin repository

$backupName = Read-Host "Enter backup name for meta regeneration"

Add-Type -Path "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Core.dll"
[Veeam.Backup.Common.LogFactory]::InitializeConsoleLog()

Try
{
	$backup = [Veeam.Backup.Core.CBackup]::GetAll() | Where { $_.Name.Equals($backupName) } | Select -index 0

    if ($backup -eq $null) {
        throw ("There is no backup with specified name : " + $backupName)
    }
	$storageAccessor = [Veeam.Backup.Core.CStorageAccessorFactory]::Create($backup)

	[Veeam.Backup.Core.CCredentilasStroreInitializer]::InitLocal()
	
	$metaUpdater = New-Object Veeam.Backup.Core.CSimpleBackupMetaUpdater
	$metaEx = new-object Veeam.Backup.Core.CBackupMetaEx -ArgumentList $backup, $storageAccessor, $metaUpdater
	$metaEx.GenerateAndSave()

	$metaFilePath = $backup.GetMetaFilePath($storageAccessor.FileCommander)
	Write-Host "Successfully saved meta for backup $($backupName) on $($storageAccessor.Name) : $($metaFilePath)"
}
Catch
{
	Write-Host $_.Exception.Message
	Write-Host $_.Exception.StackTrace
	Write-Host $_.Exception.InnerException.Message
	Write-Host $_.Exception.InnerException.StackTrace
	Break
}

$Reader = [System.IO.StreamReader] $metaFilePath 
$MyString = $Reader.ReadToEnd();
$Reader.Dispose();


$removeString = 'LinkId="00000000-0000-0000-0000-000000000000"';
$index = $MyString.IndexOf($removeString);
$lengh = $removeString.Length;

$start = $MyString.Substring(0, $index);
$end  = $MyString.Substring($index + $lengh);

$clean = $start + $end;



$writer = [System.IO.StreamWriter] $metaFilePath
$writer.WriteLine($clean);
$writer.Close();
It must be executed from the Veeam Powershell console.

Hope that helps.
--
/* Veeam software enthusiast user & supporter ! */

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

Re: Creating VBM from scratch

Post by veremin » Jul 01, 2016 9:14 am 1 person likes this post

For all new-comers, kindly, leverage the said script only cautiously and reach support team for assistance, if you don't feel confident in scripting. Thanks.

albertwt
Expert
Posts: 641
Liked: 20 times
Joined: Nov 05, 2009 12:24 pm
Location: Sydney, NSW
Contact:

Re: Creating VBM from scratch

Post by albertwt » Jul 11, 2016 7:18 am

v.Eremin wrote:For all new-comers, kindly, leverage the said script only cautiously and reach support team for assistance, if you don't feel confident in scripting. Thanks.
Yes, I agree.
Better off let the Support team assist you in running this script.

In my ase, running PowerShell script above still not resolving my issue in recreating the .VBM file.
--
/* Veeam software enthusiast user & supporter ! */

reaperhammer
Service Provider
Posts: 27
Liked: 7 times
Joined: Aug 18, 2016 7:59 pm
Full Name: Will S
Contact:

Re: Creating VBM from scratch

Post by reaperhammer » Aug 18, 2016 10:44 pm 1 person likes this post

I tested the script from here in Veeam 9 u1 and it works, some additional information is required to know how to use it though. Also I noticed Veeam 9 u1 has the feature that if you just place a VBK in a folder with VIB/VRB files when you use the import function in the GUI and import the VBK it adds the incremental files as available restore points in the imported backup (even if a part of the chain is missing), so manually creating a VBM files is not actually required anymore :D

But just for the hell of it;

# Tested on Veeam 9 u1
# Step1 Place VRB/VIB files with VBK in same dir, import the VBK file into Veeam using Veeam's import function in the gui, note down the name of the imported backup
# Step2 set powershell executionpolicy to unrestricted and execute the script, when prompted enter the name of backup job for example, Enter backup name for meta regeneration: Backup Job 5_imported
# Step3 VBM file is created in the dir with VBK/VRB/VIB files and those restore points now show in Veeam now


Here is the output of a successful VBM creation:
Enter backup name for meta regeneration: Backup Job 5_imported

Code: Select all

===================================================================
Starting new log
Log has been started by 'x\administrator' user (Interactive)
Logging level: [4 (AboveNormal)]
MachineName: [BACKUP01], OS: [Microsoft Windows Server 2008 R2 Enterprise (6.1.7601) Service Pack 1], CPU: [16]
Process: [64 bit], PID: [8492], SessionId: [6]
UTC Time: [18/08/2016 10:31:11 p.m.], DaylightSavingTime: [False]
Culture: [en-NZ], UI culture: [en-US]
CmdLineParams: []
Network Interface, Name: Local Area Connection 2, Description: LAN, Interface Type: Ethernet, Operational Status: Up;
        Unicast IPAddresses: 192.168.1.17;
        Gateway IPAddresses: 192.168.1.251;
Network Interface, Name: Local Area Connection* 9, Description: Microsoft Failover Cluster Virtual Adapter, Interface Ty
pe: Ethernet, Operational Status: Down;
        Unicast IPAddresses: fe80::3c9d:88f:448e:9ba6%18; 169.254.155.166;
Network Interface, Name: SAN 18, Description: Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #48, Interface Type:
 Ethernet, Operational Status: Up;
        Unicast IPAddresses: 172.18.0.9;
Network Interface, Name: SAN 16, Description: Broadcom BCM5709C NetXtreme II GigE (NDIS VBD Client) #47, Interface Type:
 Ethernet, Operational Status: Up;
        Unicast IPAddresses: 172.16.0.9;
Network Interface, Name: Loopback Pseudo-Interface 1, Description: Software Loopback Interface 1, Interface Type: Loopba
ck, Operational Status: Up;
        Unicast IPAddresses: ::1; 127.0.0.1;
Network Interface, Name: isatap.{5031CEB0-A8E6-4614-A57B-E0FC9FE0818B}, Description: Microsoft ISATAP Adapter, Interface
 Type: Tunnel, Operational Status: Down;
        Unicast IPAddresses: fe80::5efe:169.254.155.166%20;
Network Interface, Name: isatap.{E6410A31-4102-40EF-B2EC-41B76D622AE3}, Description: Microsoft ISATAP Adapter #2, Interf
ace Type: Tunnel, Operational Status: Down;
        Unicast IPAddresses: fe80::5efe:172.16.0.9%19;
Network Interface, Name: isatap.{FF30153B-39EB-47A6-8DDB-24DEB3445A19}, Description: Microsoft ISATAP Adapter #3, Interf
ace Type: Tunnel, Operational Status: Down;
        Unicast IPAddresses: fe80::5efe:172.18.0.9%13;
Network Interface, Name: isatap.{24D130FF-E783-4731-A60E-8BDC6A49D020}, Description: Microsoft ISATAP Adapter #4, Interf
ace Type: Tunnel, Operational Status: Down;
        Unicast IPAddresses: fe80::5efe:192.168.1.17%15;
Network Interface, Name: Teredo Tunneling Pseudo-Interface, Description: Teredo Tunneling Pseudo-Interface, Interface Ty
pe: Tunnel, Operational Status: Down;
        Unicast IPAddresses: fe80::100:7f:fffe%21;
UTC offset: 12.00 hours

[19.08.2016 10:31:11] <26> Info     [BackupMeta] Generate backup meta for 'Backup Job 5_imported:f88f4208-1d07-40a9-94e6
-e04bd3d97a38'
[19.08.2016 10:31:11] <26> Info     [BackupMeta] Backup meta for 'Backup Job 5_imported:f88f4208-1d07-40a9-94e6-e04bd3d9
7a38' doesn't exist yet
[19.08.2016 10:31:11] <26> Info     Remoting options: []
[19.08.2016 10:31:11] <26> Info     Registering TCP client channel [bstcp]
[19.08.2016 10:31:11] <26> Info     [BACKUP01.x.local] Identity for impersonation is not specified.
[19.08.2016 10:31:11] <26> Info     [BACKUP01.x.local] Creating File Commander.
[19.08.2016 10:31:11] <26> Info     [Backup] SetBackupMetaFilePath, id 'f88f4208-1d07-40a9-94e6-e04bd3d97a38', backupMet
aFilePath '':'\\192.168.0.21\veeam\Backup Job 5-old\new\\Backup Job 5.vbm'
[19.08.2016 10:31:11] <26> Info     [BackupMetaUpdater] Generating backup meta in current thread
[19.08.2016 10:31:12] <26> Info     [BackupMeta] Serializing meta for backup Backup Job 5_imported
[19.08.2016 10:31:12] <26> Info     [BackupMeta] Serialization finished
[19.08.2016 10:31:12] <26> Info     [BackupMeta] Saving backup meta to '\\192.168.0.21\veeam\Backup Job 5-old\new\Backup
 Job 5.vbm'
[19.08.2016 10:31:12] <26> Info           [BACKUP01.x.local] [FC] Saving file content [<?xml version="1.0" encodin
g="UTF-8"?><BackupMeta Version="1" OriginalBackupId="f88f4208-1d07-40a9-94e6-e04bd3d97a38"><VmObjects><VmId><string>fc44
c23f-6ed2-4bea-bd58-a3b2118eaa39</string><string>ca014512-ae2b-4f17-85ce-b1d806e27f49</string></VmId></VmObjects><KeySet
s /><Vbm KeySetId=""><?xml version="1.0" encoding="UTF-8"?><Vbm Id="b5eb2782-69a8-42ab-9b7d-b83e4dd81526" JobId
="00000000-0000-0000-0000-000000000000" JobName="Backup Job 5_imported" JobType="Backup
[19.08.2016 10:31:12] <26> Info     [BACKUP01.x.local] [FC] Renaming remote file from [\\192.168.0.21\veeam\Backup
 Job 5-old\new\Backup Job 5.vbm_1_tmp] to [\\192.168.0.21\veeam\Backup Job 5-old\new\Backup Job 5.vbm]
[19.08.2016 10:31:12] <26> Info     [Backup] SetMetaUpdateTimeAndVersion, old value: [1/01/1753 12:00:00 a.m.,-1] new va
lue: [19/08/2016 10:31:12 a.m.,1]
[19.08.2016 10:31:12] <26> Info     [BackupMeta] Backup meta for 'Backup Job 5_imported:f88f4208-1d07-40a9-94e6-e04bd3d9
7a38' generated
Successfully saved meta for backup Backup Job 5_imported on BACKUP01.x.local : \\192.168.0.21\veeam\Backup Job 5-o
ld\new\Backup Job 5.vbm
PS N:\Backup Job 5-old\new>

mamosorre84
Service Provider
Posts: 91
Liked: 6 times
Joined: Oct 24, 2016 3:56 pm
Full Name: Marco Sorrentino
Location: Ancona - Italy
Contact:

[MERGED] Manually recreate .VBM file

Post by mamosorre84 » May 02, 2017 3:24 pm

Hello,
I have to recreate a .VBM file of my backup job.
Is this script valid for Veeam B&R version 9.5 Update 1?

$BackupName = "<Name of Imported Backup>"
$Backup = Get-VBRBackup -Name ($BackupName + "_imported")
$VBMFile = "$env:UserProfileDesktop" + "$BackupName" + ".vbm"
$Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta($Backup)
$Data.Serialize() | Out-File $VBMFile
$xml = New-Object XML
$xml.Load($VBMFile)
$xml.BackupMeta.JobName = $BackupName
$xml.Save($VBMFile)
Remove-VBRBackup -Backup $Backup -Confirm:$false


I'm trying it but I'm receiving this error:

Cannot find an overload for "GenerateMeta" and the argument count: "1".
At line:1 char:1
+ $Data = [Veeam.Backup.Core.CBackupMetaGenerator]::GenerateMeta($Backup)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest


Thank you,

Marco

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

Re: Creating VBM from scratch

Post by foggy » May 02, 2017 4:50 pm

Hi Marco, please review this thread and contact support for assistance.

adamjacques
Service Provider
Posts: 1
Liked: never
Joined: Aug 22, 2014 8:37 am
Full Name: Adam Jacques
Contact:

Re: Creating VBM from scratch

Post by adamjacques » Jun 08, 2017 3:43 pm

Has anyone managed to do this in 9.5 update 2?

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

Re: Creating VBM from scratch

Post by veremin » Jun 09, 2017 6:21 pm

If the verified script exists, it will be support team that will have it. So, I'd ask them first. Thanks.

Wocka
Enthusiast
Posts: 37
Liked: 3 times
Joined: Oct 01, 2014 12:04 am
Full Name: Warwick Ferguson
Contact:

Re: Creating VBM from scratch

Post by Wocka » Nov 15, 2017 12:52 am

Hello,

Just an update. I couldn't get this script to work so I logged a helpdesk ticket.
I received a reply that this process doesn't work with a reverse incremental backup chain, which is how I run.

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

Re: Creating VBM from scratch

Post by veremin » Nov 15, 2017 11:32 am

If the script that support team have does not work for your scenario, I doubt that there is anything else that can be done for your issue, unfortunately. Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests