Views:

Question:
How to use the predefined Restore Services?

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 regulary done so they are available.

Procedure with Database Backup:

  1. Install the database again that can be an external database or the DocuWare Internal Database.
    Attention. : Do not install at the same time another Docuware Server!
  2. Restore the DocuWare Database using the according database management software (e.g. MSSQL Enterprise Manager, MySQL Administrator etc.).
  3. Install the DocuWare 5 Server modules on the server again.
  4. Restore the file cabinet disk using the according backup software.
  5. 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.
  6. Open now the Docuware Administration and login as a user who has administrative rights.
  7. Now the according workflow should be created. Well, go to the Predefined Workflow – Restore Services node and and select "New Workflow" to create a new Restore Workflow.
  8. Now a wizard which helps you creating the Restore Workflow starts. In the first dialog you can select the name, the Workflow Server and the file cabinet which should be restored.


     
  9. Now select the user which will run the workflow. The user needs rights for the file cabinet.

     
  10. Here you see all relevant storage locations for the file cabinet. You can add additional paths even if the path has not been registered as storage location yet.

     
  11. You can define filter criteria for the file cabinet to be restored. You have following criteria to select:
    - Documents of all storage locations
    - Storage date after
    - Modification date after
    - Document number (Doc ID) larger or equal
    - Disk number

    Here we use depending on the Document number or the disk number.
  12. Now you can define the options of the workflow how to react in case of conflicts. That means if the document information is different from the database information.
    - Last modification date
    - No action, only in the log file
    - Document overwrites database
    - Database overwrites document



    We would like to restore the database with the stored information in the header, so we have to use the option "Document overwrites database".

     
  13. In the last step you can define at which time the workflow will run. If you do not wish to enter a starting point, choose "Start workflow later." To close the wizard, click on the Finish button.

     
  14. If you want to start the Workflow, select it and open the context menu with the right Mouse Button. In the context menu select the item "Run once". Now the file cabinet main table will be restored with the index information of the header files. This is valid for headers of DocuWare 4 / Docuware 5 documents and COLD documents as well.
  15. Open DocuWare Client and check if all documents are available in the file cabinet.

Procedure without Backup of the Database:
If you have no backup from the database the restore causes much more effort.

You have to get at least a backup of the file cabinet disc containing the documents. Without this information you cannot restore the file cabinet.

  1. Install the Docuware 5 Server modules on the Server again.
  2. Restore the file cabinet disc using your backup software. Move these files to a temporary folder.
  3. The greatest challenge is the creation of a file cabinet with the same structure. You need the column names of the index fields inside the database. Please be aware that usually the column names are different from the display names of the index fields. If you do not have documentation about the structure, there are several ways to find out. These steps are described in the following:

    3.1 If you have used the option „Export settings" for the concerned file cabinet once, so you can use the XML-File to read out the structure.

    3.2 Otherwise it could be that from a converted file cabinet the old DocuWare 4 ADF file exists which we can use to import the structure. If you have created new fields since the conversion to use new field types, you have to consider that. For this you could adjust the fields read out from the Docuware 4 ADF with the XML headers of the new documents .

    3.3 Furthermore, a temporary ADF file exists in the cache of every client, where the according file cabinet has been registered and at least has been used once.
    This ADF file you can find at <DocuWareClientPfad>\Content Server\<USERNAME>\<GUID>\
    (Example: C:\DocuWare\Content Server\Karl\4fff2dc3-bcc4-4cee-ace2-18ac0d4b730b)



    The screenshot shows you an example to get an impression about the structure.
    Attention: In this temporary file the field names are only the display names but not the column names of the database, which we need. They could be different depending on the definition by the administrator. Here you should also consider the new XML header in the new stored documents. But be aware there are only these fields which have an entry in the according document

    3.4 In the header files the index field entries are stored. However, there are only those index fields which have got an entry when the document have been stored or modified. In some circumstances you have to consider many headers to find out the structure of the file cabinet. But it is possible that special fields were not be stored. For example a converted file cabinets where extra fields were created.

     
  4. Start the DocuWare Administration and apply a new storage location for your documents. This path can be the same like the former path which you use for the file cabinet, but it is not mandatory. But be aware that you are not allowed to use the above named temporary path of the documents.
  5. Click with the right mouse button to „File Cabinets" and select „Create new File Cabinet" 


     
  6. Enter the name of the cabinet as it has been used yet. In the sample below the name is "My Mails".

     
  7. Enter the structure of the file cabinet, as we have elaborated in step 3. Attention, that you have to use the name of the database fields in the following dialogs, because otherwise the restore workflow cannot write back all index entries.

     
  8. The other settings should be configured like the old file cabinet in the file cabinet creation wizard.
  9. Create exactly as many discs as had been available yet. Sample: after the first disc has been created by default (in the wizard), a second disc will be created (in the Administration Tool).
  10. Start the Windows Explorer and go to the file system of the storage path of the file cabinet documents. Here, many DocuWare 5 discs are available. Move these discs into a folder.
  11. Copy the restored discs into the according storage path.
  12. It is important to ascertain how many discs are available and in which mode they are. Here we have to differentiate the settings between DocuWare 4 discs and DocuWare 5 discs. This can be simply done by the extension number.

    Example for a Docuware 4 dsic: MyMails.001
    Example for a Docuware 5 dsic: MyMails.000002

    Please note all dics with the mode and the belong of the name

    Embedding of DocuWare 4 discs:
  13. Starts now the database management program (e.g. MS-SQL Enterprise Manager, MYSQL Administrator or others).
  14. Go to the database dwsystem and open the dwfilecabinet table. Search after the affected file cabinet and go to the column settings


     
  15. Copy now the total content of the column.
  16. Create a text file whereever you want (e.g Desktop) and paste all entries into this file. Save and close the text file and rename the file type to XML.
  17. Open this file with a XML editor. We used in the smape the free Altova XMLSpy Version.



    Here you see the relevant entries that we need.
  18. For every disc exactly one those elements exists. There for every DocuWare 4 disc you have to change the following entry


     
  19. Copy now the whole text and paste it into the column settings of the dwfilecabinet table again.
  20. Change now to the dwdata database and open the dwsys table. Copy out from there the entry DBDATETIME.


     
  21. Add this value into every DocuWare 4 disc. This procedure has to be done for every DocuWare 4 disc.


    Embedding of a DocuWare 5 disc:
  22. Go to the original DocuWare 5 disc which we moved in the Step 10. Open this and copy the global unique identifier GUID (e.g: 5a79216e-3566-4844-bac1-4fa2a19f006a).
  23. Now, open every DocuWare 5 disc (e.g. MyMails.000002) and replace the existing GUID with the new created file cabinet GUID.
  24. Apply all changes and close the DocuWare Administration.
  25. Go to the system table (DWSYS) and correct the entries for NEXTDOCID and CURSTOREDISK.
    Here, the value for the next used DOCID and the number of the current storage disc have to be entered.
  26. Now, open the DocuWare Administration and check if all discs exist correctly.



    Create a Workflow:
  27. Now the according workflow should be created. Go to the Predefined Workflows – Restore Services and open the context menu; select "Create new Workflow".
  28. Now, the wizard which helps you to create a workflow starts. In the first dialog you can enter the name of the workflow, the servers as well as the selected file cabinet which should be restored.


     
  29. Now select the user which will run the workflow. The user needs necessary rights for the file cabinet.

     
  30. All storage locations of the file cabinet are displayed in the following step. Here you can add extra paths.

     
  31. Now you can define the filter criteria of the restore workflow. You can select following points:
    - Documents of all storage locations
    - Storage date after
    - Modification date after
    - Document number (Doc ID) larger or equal
    - Disk number


     
  32. Now you can define the criteria how the workflow has to react on conflicts.
    Last modification date
    No Action, only in the log file
    Document overwrites database
    Database overwrites document



    We would like to restore the database with the stored header information, so we have to use the option "Document overwrites Database".

     
  33. In the last step you can define at which time the workflow will run. If you do not wish to enter a starting point, choose "Start workflow later." To close the wizard, click on the Finish button

     
  34. If you want to start the Workflow, so select it and open the context menu with the right Mouse Button. In the context menu select the item "Run once". Now the file cabinet main table will be restored with the index information of the header files. That is valid for headers of DocuWare 4 and of the Docuware 5 documents and COLD documents as well.
  35. Open the DocuWare Client and check if all documents are available in the file cabinet.