BEMCLI Submit-BELinuxMacRestoreJob Use Backup Set From tape
Hi, We have a backup job that backupsto disk. Then we have a stage that duplicate the data to tape. This works perfectly well. We are trying to make a daily script that will restore the backup set that was duplicated to the tape and run a validation script on it. Right now we have this: $sGUID = [System.Guid]::NewGuid().toString() $x = Get-BEStorage -name "Drive 01" $objBEJobhistory = GET-BEjobhistory -JobStatus Succeeded -JobType Duplicate -Name "xxxxxx" -FromLastJobRun $objBEjob = Submit-BELinuxMacRestoreJob -JobHistory $objBEJobhistory -Storage $x -LinuxMacSelection "/" -RedirectToPath "e:\temp\$sGUID" -AutomaticallyDeleteJob WhenComplete | Wait-BEJob The first problem we have is that the restore is made from the disk instead of the tape. Even if we fed the cmdlet with the job history of the duplicate job and even by forcing the -Storage param. What are we de doing wrong ? What we are trying to achieve with the cli, is easily doable in the GUI. If we click restore, I choose "Files and folder backups from a backup set". Basically, I want to choose a specific backup set and restore only the files that are in that specific backup set. Not all the files up to thatpoint in time... Any help wouldbe appreciated. Thanks in advance 305Views0likes0CommentsBackup Exec 2015 Post command XML Report
Hi, I am trying to implement a custom "verify job" using a BEMCLI in the "POST COMMAND" config option. I call it using "powershell c:\bat\myscript.ps1" and it gets called so everything works fine. The problem I am having is that I need to be able to parse the xml report that is generated during the job I saw the job ID was set as an environment variable so I read it using sJobID = $env:BE_JOB_ID There is also a second environment variable which is $sXmlFileName = $env:VSR_LOG_FILE_NAME which seems to be the temporary xml report (The name looks like C:\Program Files\Symantec\Backup Exec\Data\VSR_Log_File1.xml" But I can't find the data I need in the reports. It seems the report gets saved AFTER the post command is completed so the file BEX_SERVER06_00025.xml (number gets incremented on each run) is not available... I've been playing with Get-BEJob -id $sJobID | Get-BEJobHistory -FromLastJobRun | Get-BEJobLog Without success... Is there a way to retrieve what files were backuped during the post command phase ? I need to return an error if my custom verify finds something invalid so that the job state is switched to "failed". Any help would be appreciated. Regards797Views0likes5CommentsBEMCLI / Powershell /Backup Exec 2014 / Submit-BEFileSystemRestoreJob
My fileserve backup selectionsare done using \\SERVER\ShareName Is there a way restore using BEMCPLILI with Pointing to the share as a Path? As of Now, only wat i found to do a restore is this way (But it means I must change all my jobs) $File=(Get-Childitem -path "\\Server\D$\Folder\Folder" ` | Get-Random -Count 1).FullName.ToUpper().Replace("\\SERVER\D$","D:") Get-BEJob -Name *00058* ` | Get-BEJobHistory -FromLastJobRun ` | Submit-BEFileSystemRestoreJob $file ` -RedirectToPath D:\RestoreTestJobsFolder Looking for a way to restore using a "share path instead" if possible (This does not work) $File=(Get-Childitem -path "\\Server\Share\Folder\Folder" ` | Get-Random -Count 1).FullName Get-BEJob -Name *00058* ` | Get-BEJobHistory -FromLastJobRun ` | Submit-BEFileSystemRestoreJob $file ` -RedirectToPath D:\RestoreTestJobsFolder Thank you for your help!513Views1like0CommentsModifying all job properties via scripts?
Hi y'all. We're running Backup Exec 2014 (14.1, Rev. 1786) on Windows Server 2008 R2 Std.x64. My teaminherited a number of backup jobs created by folks who moved on. One of the things we'd like to do is modify all the jobs so they email and/or page us when there is a job error or failure. There areabout 100 different jobs, hence the desire for a script. The only properties of the jobs we want to change at this time is to add 2 users and a pager to the job notification properties. Can this be done via powershell or BEMCLI? Anyone have any examples of a script which does something like this? Thanks, in advance, forthe advice. GarySolved514Views0likes1CommentBackup Exec 2014 BEMCLI - SDR cmdlet shows bad information using Get-BEBackupDefinition
Morning guys, I have a question about the cmdlet "Get-BEBackupDefinition". When I use BEMCLI queries in some BE 2014 Servers, all jobs defined returned SDR is disabled. In some cases, it is false because checking the GUI, in each job, many jobs show the green light enabled "simplified Disaster Recovery: ON". PS >> get-BEBackupDefinition | select name,simplifieddisasterrecoveryenabled Name1 False Name2 False My question is if really the cmdlet "Get-BEBackupDefinition" filtering by simplifieddisasterrecoveryenabled shows a correct information and SDR is disabled or it is a bug,1.1KViews0likes6CommentsBackup Exec 2014 BEMCLI - Exception returning data
Hi guys, I am developing some scripts in Powershell and I found a problem using BEMCLI. I have installed a new Backup Exec 2014 from scratch (first was an upgrade from 2012 to 2014). I execute the following code in Powershell Import-Module BEMCLI $jobs = Get-BEJob | Where-Object {$_.JobType -eq "Backup"} Then when I check the information, the atribute "Taskname" returns this Exception getting "TaskName": "The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter BackupExec.Management.Services:GetSolutionResult. The InnerException message was 'Element 'http://schemas.datacontract.org/2004/07/BackupExec.Management.Objects:TaskDefinition' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/BackupExec.Management.Objects:BackupCustomTaskDefinition'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'BackupCustomTaskDefinition' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details." I a second server following steps I received the correct data insise D for daily jobs W for week jobs I dont understand really the problem. Where the code works I am running W.S 2012 R2 and where it fails is W.S 2008 R2Solved645Views1like1CommentBEMCLI - getting a job log in xml format
Hi guys, I hope you can help me. I am using BEMCLI module in Powershell and I would like to receive a job log in xml format. Directly, using Get-BEJobLog you can receive the log file in txt or html format. Do you know a easy way to receive the log file on xml format?Solved807Views0likes3CommentsBE 2014 BEMCli Powershell commandlet timeout
Hi all, I have a Backup Exec 2014 Server (underWindows 2008 R2) that comes from a recent migration from BE2010 R3. The mirgation was OK, no problem... but I have more than 100 job definition to rename and I would to script it, as "point and click" solution is too long... So I'm trying to use the "Get-BEBackupDefinition" commandlet (just to pipe the result in a Rename-BEBackupDefinition commandlet). But this "Get-BEBackupDefinition" commandlet is very verye very long to execute... more than 10 minutes... and no result, but this error message : " Rename-BEBackupDefinition : Impossible de trouver un paramètre correspondant au nom « id ». Au niveau de ligne : 1 Caractère : 30 + Rename-BEBackupDefinition -id <<<< F44CEAAA-083F-4B34-BE9E-485566476D33 -New Name AXAPTA-Q-NEW + CategoryInfo : InvalidArgument: (:) [Rename-BEBackupDefinition] , ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,BackupExec.Management.CLI .Commands.RenameBEBackupDefinitionCommand " During the execution, the local SQLServer 2008 Express is consumming one core à 100%... so I assume that the commandlet is not optimized at all. But am I the only one to have this problem ? Could someone try this commandlet and tell me if it runs normally ? Thansk in advance.378Views0likes0CommentsBEMCLI in remote
Hallo everybody, I would like to deploy some powershell scripts combining with BEMCLI. Currently I have two backup exec servers in two remote offices. On version in 2010 R3 and other version is 2012. From my computer, I am using Windows server 2012 R2 with powershell v.4 , with BE 2014 installed (trial version) and I loaded BEMCLI module in my powershell code without errors. I can see all functions included. Now I would like to execute some BEMCLI commands on the remote servers for reading information (for example backup jobs). I tested some comands and fails. I used PSSession for executing BEMCLI functions and fails. I would like to ask if you can help me showing how can I execute a query on remote backup exec. Last test was this code Import-Module -Name BEMCLI Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB -Value 2048 $session = New-PSSession -ComputerName "NKS-MPS.ingrnet.com" Invoke-Command -Session $session -ScriptBlock { Get-BEJobHistory } Remove-PSSession $session1.3KViews0likes2CommentsUsing BEMCLI for delete existing older backup sets
Hello, i don't find a cmdlet for delete older existing backup sets from an Media Server. From the UI, Backup and Restore, select a Server and Backup Sets. Iselect the needed Backup Sets and with right Mouse clic Delete. Easy This is possible only for one or more Backup Sets but not for any Servers and any many old Month backup Set. From bemcli, i want use : Get-BEJob "$ServerName $BackupType" | Get-BEJobHistory | Where-Object {($_.StartTime -lt $a)} | ???????? I found :Remove-BEJobHistory but will only delete the history.What happens with the Backup Sets ? Otherwise, is it possible to change, with bemcli,the Expiration Date ? So BackupExec will remove automatically this older BackupSet Thanks for help. DanielSolved890Views0likes2Comments