How to use the Restore Services in DocuWare version 7 and higher?
This article describes how to restore a file cabinet after a complete new installation of a DocuWare system. One reason for a new installation can be a hardware issue that causes a complete server crash. The necessary backups of database and of document files were regularly done so they are available. The DocumentTool.exe is a standard console application controlled by command line parameters. It is located in the Background Process Service folder of your DocuWare installation. For the restore operation to work, the database structure must be present. If the database structure has been lost, you can restore it either from a database backup or by creating a new file cabinet with an identical structure.
The File Cabinet GUID, which can be found in the File Cabinet configurations plugin, will need to be retrieved.
- Go to "More options":
- The File Cabinet GUID can be found here, copy this to a notepad, as it will be used later on:
- Install the database again, that can be an external database or the DocuWare Internal Database.
- Restore the DocuWare Database using the according database management software (e.g. SQL Management Studio, MySQL Administrator etc.).
- Install the DocuWare Server modules on the server again.
- Restore the file cabinet disk using the according backup software you may have used. Now all DocuWare settings as well as the file cabinet settings are available again, but often new documents have been added to the file cabinet since the last backup. So there is a difference between the restored system and the document files. To close this difference, the restore workflow is used.
- An XML will need to be created in the Background Process Service folder of the DocuWare installation. In this case, DocumentTool.SampleRestoreSettings.xml will be used as the XML file name.
- Open the XML in notepad, in the XML will be the following:
<BatchDocumentSettings fileCabinetGuid="e3dcc667-3bb3-46fd-9b23-395bd28a0f52" conflictOptions="DocumentOverrideDb">
<DocumentsFilter fromStorageDateTime="2017-06-12T05:54:27" toStorageDateTime="2018-06-12T05:54:27" fromModificationDateTime="2017-06-12T05:54:27" toModificationDateTime="2018-06-12T05:54:27" fromDocID="0" toDocID="1500">
There are many different filter options to use (only certain dates, disks, dwdocid's, etc. may be needed) but for this example, a filter is not going to be used in this example as all documents need to be restored to the File Cabinet.
The XML contents should look like the following. Only the File Cabinet GUID will need to be changed to correspond with the File Cabinet that is being restored to.
<BatchDocumentSettings fileCabinetGuid="0e455b69-63e1-4785-bb78-1c8dcbb54c70" conflictOptions="DocumentOverrideDb">
Once the fileCabinetGuid has been altered to the appropriate GUID, save and close the XML.
- Next a command needs to be run in CMD to start the Restore process. Note: This must be done in this exact way otherwise the tool may run into "File not found" errors.
- 'cd' to the folder where Background Process Service is installed and enter the following command:
DocumentTool.exe -filename=DocumentTool.SampleRestoreSettings.xml -jobtype=0 -username="admin" -password="admin"
*Adjust to your filename, DocuWare username, and password accordingly.