Views:

Question:

How to use the Restore Services in DocuWare version 7 and higher?

Solution:

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:

Procedure:

  1. Install the database again, that can be an external database or the DocuWare Internal Database.
  2. Restore the DocuWare Database using the according database management software (e.g. SQL Management Studio, MySQL Administrator etc.).
  3. Install the DocuWare Server modules on the server again.
  4. 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.
  5. 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.
  6. 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">

    <DiskNumbers>
    <System.Int32>2</System.Int32>
    <System.Int32>3</System.Int32>
    </DiskNumbers>
    </DocumentsFilter>
    </BatchDocumentSettings>


    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">
    <DocumentsFilter>
    </DocumentsFilter>
    </BatchDocumentSettings>


    Once the fileCabinetGuid has been altered to the appropriate GUID, save and close the XML.
  7. 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.
  8. '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.




Here is an example of the running Restore:



The Restore process has now been completed.

If you receive error "Table '' does not exist", see KBA-36294.

For versions below DocuWare 7, see KBA-34330.

Comments (0)