Novell is now a part of Micro Focus

Tip: Workaround for Embox Script Error

Novell Cool Solutions: Tip
By John Fuge

Digg This - Slashdot This

Posted: 20 Apr 2005


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  -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


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 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.
# 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  -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.
# 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.
# 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.


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

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

© Copyright Micro Focus or one of its affiliates