cancel
Showing results for 
Search instead for 
Did you mean: 

Problem using selection in restore scripts with bemcmd -o90

yann_ARMAND
Level 4
Hi,

I'm using BackupExec as a backend for archiving/restoring datas.
Now in v11 we have opportunity to restore a single file by selecting it using :

SELECTION1=/path/to/file

We got some trouble, tested on several machines, ans I'll try to be clear by describing a sequence of actions, and there results.

1) Create a seleection list using -o220
2) Create an backup job by attaching a policy -o264
===>Backup is done now
3) Creating a restore script
4) Create a restore job using -o90
===> ERROR : 'bad selection'
5) Create a restore job using -o39 on the same file in step 3 script
===> It WORKS
6) Another try on script using -o90
===> It WORKS

This sequence have been verified on 2 test machines.

We think -o39 initialize some datas or make some synchronization with catalogs, and then BE found a valid selection when using -o90.

Of course our need is using -o90 (not -o39) because of the options available (file redirection, submit hold ...)
9 REPLIES 9

perry_baker
Level 6
Employee Accredited
I think you may need additional action prior to the -o90 if you check the bemcmd admin guide and look on page 130 it lists the following note:

The Job History GUID is required for bemcmd -o90 restores. To obtain the History GUID, first use -o23 and /or -o506 to obtain the Job Instance GUID. use the Job Instance GUID with -o21 to obtain the Job History GUID.

yann_ARMAND
Level 4
before v11, Job History GUID was the only way to restore a file.
But it has a big issue is : when you clear monitor log, historyGUID are dumped from DB and no more restore can be done using -o90.

Using SELECTION1 do not need JOBHISTORY_GUID anymore.
We see in page 142 "JOBHISTORY_GUID or SELECTIONx" (note that 'or' ).
And as a proof, between step 4 and 6, I do not change my script content.
Here is one of my scripts, as example :

JOB_TYPE=Restore
JOB_NAME=wnaRequest_96_0

RESTORE_SECURITY=YES
RESTORE_PRESERVE=1

SELECTION1=\\SHEENA\C:\Fullpress\prod\testArchive\v11\clic9.jpg

yann_ARMAND
Level 4
please someone help me.

I'm simply blocked into my developement because of that issue.

Mike_Muske
Level 2
I am having the same problem. Sometimes the o90 command works and other times it does not. The output when I run the o90 command with a restore script is as follows:

>bemcmd -c -v -o90 -fRestoreScript.txt

Backup Exec Command Line Applet version 11.0.6235.
Copyright (c) 2006 Symantec Corporation. All rights reserved.

Connecting to media server '\\'...
Connected.
Reading script file...
Inserting schedule...
Inserting job...
ERROR CODE: -536813557
ERROR:
Disconnecting from server...
Disconnected.

RETURN VALUE: -1

The error code does not even look like a valid error code. I tried passing it to the o999 command and the output was:


>bemcmd -c -v -o999 -e-536813557

Backup Exec Command Line Applet version 11.0.6235.
Copyright (c) 2006 Symantec Corporation. All rights reserved.

Connecting to media server '\\'...
Connected.
ERROR:
Disconnecting from server...
Disconnected.

RETURN VALUE: 1

When I convert the -536813557 to hex it is FFFFFFFFE000E00B. Or maybe just E000E00B. When passing either hex value to the o999 command, the result is the same as above. Not very helpful. Any idea what that negative error code means and why my restore script is failing?

The restore script being run looks like this:

/*=========================*/ /* RESTORE SCRIPT */
/* operations: 90 */



JOB_TYPE=Restore
JOB_NAME=Feb20Restore
JOB_PRIORITY=Medium



RESTORE_EXISTING=YES
RESTORE_CORRUPT_FILES=NO
RESTORE_SECURITY=NO
RESTORE_PRESERVE=NO



JOBHISTORY_GUID={2EFE65F6-3DA5-4410-ADA3-DB4234706C30}



RUN_IMMEDIATE=YES

/*=======================*/


Thanks.

yann_ARMAND
Level 4
I had this kind of negative error code in that case :

You are using the JOBHISTORY_GUID in your script, in that case you have to be sure that
this job is still present in your job monitor log.

If you have empty your job monitor, there is no way to restore using JOBHISTORY_GUID.

Mike_Muske
Level 2
Thanks, I haven't emptied my log however, so I'm not sure why it isn't finding the job. I am trying to restore a backup job that I ran and completed less than a few minutes ago. Also, I believe the GUID being passed in is in fact the JOBHISTORY_GUID. I retrieved it using the -o21 -i{.....} command where the {....} was retrieved using the -o23 -i command. Still no luck...

yann_ARMAND
Level 4
using -o23, then -o21 is the good way to find JOBHISTORY_GUID.

Mike_Muske
Level 2
Any idea what the error message is that I'm seeing with my restore script? Thanks.

yann_ARMAND
Level 4
No idea, sorry.