jssdbbackup.bat (backs up databases)
- Organization of this page
Description
This command backs up data in the database of JP1/Service Support. When JP1/Service Support uses the Item storage database, the Item management database and the Item storage database are both backed up.
To run this command, go to the Start menu and click Programs, JP1_Service Support, and JP1_SS Command Prompt. Then execute the command.
Format
jssdbbackup.bat {-f backup-file-name | -o folder-to-output-the-backup-file-to {-ALL | -mdb | -sdb} [-ow]} {-maint | -expand}
Required execution permission
Administrator permissions
Storage folder
JP1/SS-path\tools\
Arguments
-f backup-file-name
Use an absolute path to specify the name of the file to which you want to output a backup of data in the database of JP1/Service Support. The data in both the Item management database and the data in the Item storage database is backed up. Create the folder to output the backup file to before you execute the jssdbbackup.bat command.
Note the following when you create a backup file:
-
Always create the backup file on a local drive. You cannot create a backup file on a network drive.
-
You cannot use a UNC path to specify the backup file.
-
The path for the backup file must be an absolute path consisting of 259 bytes or less. The backup file name itself must be 255 bytes or less. Count two bytes for full-width characters in the file name.
-
The backup file name must not contain multi-byte characters. In addition, you cannot use character strings that are not recognized by the OS.
-
If the output destination folder contains another file with the same name as the specified backup file, the existing file will be overwritten. If you do not want to overwrite an existing file, specify a unique file name.
-o folder-to-output-the-backup-file-to
Use an absolute path to specify the name of the folder to which you want to output a backup of data in the database of JP1/Service Support. Create this folder before you execute the jssdbbackup.bat command. When you execute the jssdbbackup.bat command, a file that records the status when the backup is made (dbpath.txt) is stored in the folder to which the backup file is output. In dbpath.txt, the option information specified at backup, the size of the Item management database at backup, and information about the folder to expand the Item storage database to is output. The information about the folder to expand the Item storage database to is the same as the information output when the jssdbstatchk.bat (checks the status of the database) command with the -dbpath option is executed. The specified folder to output the backup files to has the following structure:
Name-of-the-folder-to-output-the-backup-file-to |- dbpath.txt File that records the status of the database when the backup is made |- mdb_option# Folder to output the backup file for the Item management database to |- sdb_option# Folder to output the backup file for the Item storage database to
- #
-
Either of maint or expand.
Note the following when you specify the name of the folder to output the backup file to:
-
Make sure that you specify a local drive for the drive to output the backup file to. You cannot specify a network drive.
-
You cannot specify a UNC path.
-
Use an absolute path of 80 bytes or less to specify the path to the folder to output the backup file to. If the character string specified for the folder name contains full-width characters, the full-width characters are converted to 2-byte characters.
-ALL
Backs up data in both the Item management database and Item storage database.
-mdb
Backs up data in the Item management database only. In addition to the folder to output a backup of the Item management database to, a folder to output backup of the Item storage database to is also created. However, files are not created.
-sdb
Backs up data in the Item storage database only. In addition to the folder to output a backup of the Item storage database to, a folder to output backup of the Item management database to is also created. However, files are not created.
-maint
Creates a backup file to be used to restore data in the database of JP1/Service Support.
-expand
Creates a backup file to be used to expand the database of JP1/Service Support, or move the data in the database of JP1/Service Support between servers.
-ow
Overwrites a backup file that already exists in the folder (specified with the -o option) to output a backup file to. When a backup file already exists in the folder to output a backup file to, if you execute the command without specifying this option, the command terminates with an error.
Return values
Return value |
Meaning |
---|---|
0 |
Normal end |
1 |
Abnormal end |
Prerequisites for executing the command
-
For details about which services need to be active or inactive when this command is executed, see Status of services when commands are executed in Chapter 12. Commands.
-
While the jssdbbackup.bat command is being executed, do not execute other JP1/Service Support commands.
-
Note the following when you specify the -expand option:
-
Before you execute the jssdbbackup.bat command with the -expand option to make a backup, execute the command with the -maint option to make a backup.
-
If you attempt to use a backup file that you created by using the jssdbbackup.bat command with the -expand option to recover the data in the same database of the same size or to move the data to another database of the same size, the operation might fail. If you want to recover the data in the same database of the same size or move the data to another database of the same size, execute the jssdbbackup.bat command with the -maint option.
-
-
You cannot recover the data in the Item management database using a backup file that was created on a different server running a different version of JP1/Service Support. If you want to use a backup file to recover the data in a database, create the backup file on a server running the same version of JP1/Service Support. Suppose you create a backup file on a server running one version of JP1/Service Support, and then you execute jssdbrecovery.bat using that backup file on another server running a different version of JP1/Service Support. If you continue using JP1/Service Support on the other server, the data newly registered in the database and the database itself will become abnormal.
Remarks
-
When you execute the jssdbbackup.bat command, multiple child processes start within the system. Even if you cancel the jssdbbackup.bat command by using Ctrl+C, the child processes continue running. For this reason, do not cancel the jssdbbackup.bat command during execution by using Ctrl+C. If you do, make sure that the pdcopy process is inactive when the -maint option is specified. When the -expand option is specified, make sure that the pdrorg process is inactive. Wait for a while and restart the JP1/Service Support - DB Server service.
-
If a KNAB26102-E error message appears when you execute the jssdbbackup.bat command, check if any of the following causes applies. If one applies, take the appropriate countermeasures and then re-execute the command.
-
A relative path was used to specify the backup file.
-
The specified backup file is a folder.
-
A UNC path was used to specify the backup file.
-
The absolute path for the backup file exceeds 259 bytes.
-
The backup file name itself exceeds 255 bytes.
-
The backup file name is specified in multi-byte characters. Alternatively, a character string that is not recognized by the OS is used.
-
The drive used as the output destination of the backup file has insufficient space.
-
-
Note the following when you specify the -maint option for the jssdbbackup.bat command:
-
If the backup file name specified with the -f option contains uppercase characters, they are converted to lowercase characters.
-
-
For details about how to expand the Item management database, see 11.2.4 Expanding the size of the Item management database.
-
The database is reorganized when you execute the jssdbbackup.bat command with the -expand option specified (to make a backup file). For this reason, when you execute the jssdbrecovery.bat command to recover the data in the database using the backup file, the database might require more space than before the backup was made. This might result in failure to recover the data in the database. To prevent this problem, perform the following procedure:
-
Execute the jssdbbackup.bat command with the -maint option to create a backup file. Execute the jssdbrecovery.bat command with the -maint option to recover the data in the database using the backup file.
-
Execute the jssitemdeletion command to place the unnecessary Items in "Waiting to be deleted" status.
-
Execute the jssdelrec command to place unnecessary Items in the Waiting to be deleted status.
-
Execute the jssdbbackup.bat command with the -expand option.
-
Execute the jssdbrecovery.bat command with the -expand option to recover the backup file created in step 4.
-
-
Each time before you execute the jssdbbackup.bat command with the -o option specified, prepare a different empty folder as the folder to output a backup file to. Also, do not rename the folders and files in the folder to output a backup file to. If you rename them, recovery might fail.
-
If you execute the jssdbbackup.bat command with the -sdb option while the JP1/Service Support service and JP1/Service Support-Web Service service are running, note the following:
-
Do not start or stop the services while the jssdbbackup.bat command is executed.
-
Do not execute a command that updates the Item storage database (for example, the jssitemstore (stores Items) command or jssstoreitemdel.bat (deletes multiple stored Items) command). If you execute a command that updates the Item storage database, the command terminates with an error.
-
Example
The following example shows how to create a backup file (c:\backup\backup).
jssdbbackup.bat -f c:\backup\backup -maint