Archiving Call/Mail Attachments and Mail Data

From support-works
Revision as of 16:10, 15 July 2015 by DavidH (talk | contribs)
Jump to navigation Jump to search



Status: Published
Version: 1.0
Authors: HTL QA
Applies to: Supportworks ESP

Archiving Call/Mail Attachments and Mail Data

NOTE: A SCRIPT TO PERFORM THIS ARCHIVING IS BEING PLANNED FOR USE BY CUSTOMERS. ONCE THE SCRIPT IS AVAILABLE, THIS DOCUMENT WILL BE DEPRECATED.

Introduction

Generally, there is no need to archive call or e-mail data in Supportworks, as the system stores all such data indefinitely - at least until the hard-disk space runs out. However, precisely because of these disk restraints, there are likely to be occasions when any of the following requirements may apply:

  • To remove file attachments from calls/messages that are no longer required and then store them elsewhere.
  • To externally store the textual contents of certain e-mail messages for historical reasons, which would then allow you to delete the actual messages themselves from Supportworks.
  • To archive entire mailboxes to another location.

Each of these requirements is covered in this document.

Archiving the File Attachments of Old Calls

In Supportworks, all file attachments relating to calls are held at the following location (assuming a default installation):

C:\Program Files\Hornbill\Supportworks Server\data\cfa_store\

At this location, you will see one or more numerically named sub-folders, the first being 0000, the second 0001, and so on. The attachments are stored as ZIP-compressed files within these sub-folders (unless already compressed by virtue of the file type). The name of each file is made up of the relevant call reference number, followed by a numerical extension such as .001, which defines that specific attachment within the call concerned. Each of the sub-folders contains the attachments for up to 1000 calls, so the sub-folder named 0000 would relate to call references 1 to 1000, sub-folder 0001 to call references 1001 to 2000, and so on.

Thus, for example, the attachments for call reference 5678 would be held in C:\Program Files\Hornbill\Supportworks Server\data\cfa_store\0005, and the third attachment within that call would be named f00005678.003.

Hint: To find the path to the \data folder on a non-default installation, run the Server Configuration utility, select the Database tab and look in the Data Folder field.

Note that the data containing the original files' names and other pertinent information about each call's attachments is held in the database as part of the call record.

To archive a set of call file attachments, you simply move the relevant sub-folders and their contents to the designated storage medium.

If you then wished to view any of these attachments some time in the future, you would first have to find the sub-folder in which it is held on the storage medium (based on the call reference), then create a folder of the same name in \cfa_store (on the same system where the associated call is held), and finally copy the attachment over to that folder. You would then be able to search for the call concerned and open the restored attachment in Supportworks. (You may need to restart the Supportworks server first.)

Archiving the File Attachments of Old E-Mail Messages

If you are using the E-Mail Audit Trail feature of Supportworks and you also archive call file attachments (see above), then there should never be any need to specifically archive the files attached to e-mail messages. Nevertheless, if there really is such a requirement, then this section provides the necessary details.

In Supportworks, all file attachments relating to e-mail are held at the following location (assuming a default installation):

C:\Program Files\Hornbill\Supportworks Server\data\_mb_attstore\

This folder contains all e-mail attachments, irrespective of the mailboxes to which they belong. The server and client both reference these by their unique filenames, and they are linked to calls via the mailbox-specific attachment tables held in the sw_messagestore database. The filename of each attachment is made up of an auto-incremented hex number and the extension .dat.

Hint: To find the path to the \data folder on a non-default installation, run the Server Configuration utility, select the Database tab and look in the Data Folder field.

To archive all file attachments up to a given date, you simply move the files concerned to the designated storage medium.

If you wished to view any of these attachments some time in the future, you would first read off the date/time of the message to which it was attached. On the storage medium, you would then look for a .dat file with a matching date/time and copy it over to the \_mb_attstore folder on the Supportworks server. On selecting the e-mail message concerned in Supportworks, you would then be able to open the restored attachment. (You may need to restart the Supportworks server first.)

Archiving the Textual Contents of Old E-Mail Messages

If you are using the E-Mail Audit Trail feature of Supportworks and you also archive call file attachments (see above), then there should never be any need to separately archive e-mail messages. Nevertheless, if there really is such a requirement, then this section provides the necessary details.

Should you wish to delete old e-mail messages from Supportworks but keep their text content for your archives, the preferred method for obtaining the text from the message records is to export it to a Microsoft Excel spreadsheet. The complete procedure would be as follows:

  1. Perform a search of each mailbox in the E-Mail view to obtain lists of messages you wish to archive.
  2. For each set of results, right-click and select Export Data, followed by All Rows or Selected Rows, as required.
  3. Work through the Data Export wizard, selecting all columns of the table and Excel as the format, and avoiding display-name options throughout.
  4. Once you have exported the content, you can delete the messages concerned.

To restore the e-mail messages at a later date, use the Data Import Manager to define and run suitable Excel file imports.

Archiving an Entire Mailbox

If you wish to archive an entire mailbox, you could use the following method:

  1. Stop the main server and the SQL server by opening a Command Prompt window and entering the following commands:
    net stop SwServerService
    net stop SwSqlServer
  2. Navigate on the server to the following location (assuming a default installation):
    C:\Program Files\Hornbill\Core Services\SwSqlServer\data\sw_messagestore\
  3. Copy the following set of database files from this location to the designated storage medium:
    shared__mailbox_*.*
    where mailbox is the name of the mailbox to be archived.
  4. Restart the SQL server and the main server by opening a Command Prompt window and entering the following commands:
    net start SwSqlServer
    net start SwServerService
  5. Run the Server Configuration utility and select the System Mailboxes tab.
  6. Delete the mailbox you have just archived.
  7. Recreate the mailbox, using the same name as before.

Subsequently, you can restore the archived mailbox files to the corresponding location on a Supportworks test server. Before copying the files, you must ensure that the test server contains a mailbox of the same name, which means that the existing mailbox files on that system will be overwritten by the copied files. Again, the two services should be stopped while the files are being copied.