Views:

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

Solution:
This article describes how to restore a file cabinet after a complete 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 the 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, which is located in C:\Program Files\DocuWare\Background Process Service. 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.

First, the File Cabinet GUID is needed for this process. Navigate to the File Cabinet configurations plugin, then open the file cabinet we wish to run this restore on. From the General tab, click on
 "More options"

The File Cabinet GUID is in the Administrative information section. Copy it to a notepad, as it will be used later.

Procedure:

  1. Install the database again, which can be an external database or the DocuWare Internal Database.
  2. Restore the DocuWare Database using the appropriate 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 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 your filename, DocuWare username, and password accordingly.***


If run correctly, the Comand Prompt will display a  "DocuWare" banner followed by lines of Processed documents range which shows all the documents being processed within the file cabinet.


The restore process has now been completed. If you receive the error "Table '' does not exist," please refer to KBA-36294.
For versions below DocuWare 7, see KBA-34330.

KBA is applicable for On-Premise Organizations ONLY.

Comments (0)