Novell Home

Tip: Workaround for Embox Script Error

Novell Cool Solutions: Tip
By John Fuge

Digg This - Slashdot This

Posted: 20 Apr 2005
 

Problem

Running the embox scripted backup gives an "Invalid command line switch error" after applying NW6.5 SP3. The screen flashes pretty quickly, so you may need to run the script several times to catch the error message. Or, you can login and run the backup manually to see the error.

Here is a one-line command from my edirback.ncf file. Notice the -e switch near the end. This is a broken script.

?y java -nsac -cp sys:\system\embox\eMBoxClient.jar embox -s 10.1.1.1  -p 8008 
-u .admin.myco -w password -n -t backup.backup -b -f sys:\system\edirback\edirback.bak 
-l sys:\system\edirback\edirback.log -u sys:\system\edirback\edirincl.txt 
-e -t -w

Solution

You will need to remove the -e (NICI) switch from the end of the script to complete the backup process. Novell did document that the switch was removed in eDirectory version 8.7.3.4 and later, but they did not document that it would stop the scripted backups from running at all. You could always add the files from the sys:system\nici directory to your include file. That way the files would still be in the backup - you would just have to do a little more work.

Remember, just remove the -e from the end and leave everything else as it is. Don't forget to review your backup log file to ensure that the backup is still running sucessfully.

Example 1: eDirectory Backup Script File

Here is an example of my working eDirectory backup script file I named EDIRBACK.NCF:

load config
# The line above is to just get a copy of the config.txt with the current 
# configuration backed up.
#
#
?y SET COMMAND LINE PROMPT TIME OUT=60
# The above command is to change the default delay of the "?" command to 60 
# instead of 10 seconds
#
#
#
#
?y java -nsac -cp sys:\system\embox\eMBoxClient.jar embox -s 10.1.1.3  -p 8008 
-u .admin.corp -w password1 -n -t backup.backup -b -f edirback:edirback.bak -l 
edirback:edirback.log -u edirback:edirincl.txt -t -w
#
# The above line will backup edir, schema, and nici.
# The referenced include file will backup the following files:
#     sys:public\rootcert.der
#     sys:system\config.sys
#     sys:tomcat\4\webapps\nps\WEB-INF\PortalServlet.Properties
#  All my be necessary to help in a restore.
# Note:  When restoring NDS, you will restore these files as well if they are
# in the include file.
#
#
#
cls
# The above CLS line is to clear the screen right after the command is run. 
# This prevents unecessary exposure of the password associated with the 
# JavaScript executing above.
#
#
#
?y SET COMMAND LINE PROMPT TIME OUT=10
# The above command line is to change the default dealay of the "?" command
# back to 10 seconds. 

Example 2: Referenced File for Backups

Here is an example of my EDIRINCL.TXT file that I reference in my EDIRBACK.NCF file. This text file causes the backup process to grab a few more files from my server. All of this really helps with disaster recovery. Notice that I added the NICI directory files to this backup.

sys:etc\hosts;sys:system\config.txt;
sys:public\Rootcert.der;
sys:tomcat\4\webapps\nps\WEB-INF\PortalServlet.Properties;
sys:system\nici\nicisdi.key;
sys:system\nici\xarchive.000;
sys:system\nici\xarchive.001;
sys:system\nici\xmgrcfg.ks2;
sys:system\nici\xmgrcfg.ks3;
sys:system\nici\xmgrcfg.nif

For information about setting up a scripted backup using Embox, see the "Backup and Restoring Novell eDirectory" chapter of the eDirectory manual at:

http://www.novell.com/documentation/edir873/index.html


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell