BlobExport¶
Utils.BlobExport.exe
is a console application used to export recordings, attachments, and emails (iCC.Message.Eml, iCC.Attachment.BinaryContent, SRec.VoiceRecord.RecordData
) that are stored in the FrontStage V3 local database to a local file system or Azure cloud storage. Exporting.mp3
from the file system is also available.
The utility itself does not delete any binary data from the database or file storage. The utility requires the installation of .NET 8 for Windows - it is optimal to install the relevant .NET Desktop Runtime
.
Command line¶
The export type is specified from the command line using the first parameter. Possible values are:
Message
- exportMessage.Eml
, the exported items will have theDeviceRank
column changedAttachment
- exportAttachment.BinaryContent
, exported items will have theDeviceRank
column changedVoiceRecord
- exportVoiceRecord.RecordData
or files referenced in theVoiceRecord.FileName
column, exported items will have theCallState
column changed (the column name can be changed in the configuration)Both
- export asMessage
andAttachment
All
- export all
Configuration¶
The utility requires settings in the appsetting.json
file:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
},
"Console": {
"FormatterName": "simple"
}
},
"BatchSize": 100,
"ConnectionStrings": {
"iCC_ConnectionString": "Server=.;Database=iCC;Trusted_Connection=True;TrustServerCertificate=True;",
"SRec_ConnectionString": "Server=.;Database=SRec;Trusted_Connection=True;TrustServerCertificate=True;"
},
"SRecSourceFolderPath": "C:/Temp/VoiceRecordSoundFiles",
"VoiceRecordMarkingColumn": "CallState",
"MessageStorage": {
"DeviceType": "StorageFileHierarchy",
"DeviceRank": 80,
"RootDirectoryPath": "C:/Temp/BlobExport"
},
"AttachmentStorage": {
"DeviceType": "StorageFileHierarchy",
"DeviceRank": 80,
"RootDirectoryPath": "C:/Temp/BlobExport"
},
"VoiceRecordStorage": {
"DeviceType": "StorageAzureBlob",
"DeviceRank": 90,
"ConnectionString":
"DefaultEndpointsProtocol=https;AccountName=xxxxxxxxxxxxx;AccountKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;EndpointSuffix=core.windows.net",
"ContainerName": "blobexport2"
}
}
General settings¶
Logging
- standard sectionBatchSize
- batch size (number of records that are processed at once)
Source data¶
iCC_ConnectionString
- access to the FrontStage database. For more info see Connectionstring. (V3.25 - the schema must already contain theDeviceRank
column in theMessage
andAttachment
database tables), relevant for message and attachment exportsSRec_ConnectionString
- access to SRec database (V3.x), relevant for exporting recordingsVoiceRecordMarkingColumn
- the name of the column from theVoiceRecord
table that is used for marking already exported records. Relevant for exporting recordingsSRecSourceFolderPath
- the root folder for the recordings stored in the file system and referenced by the relative path in theFileName
column of theVoiceRecord
database table. Relevant for exporting recordings
Target data¶
There are three sections for specification: MessageStorage
, AttachmentStorage
and VoiceRecordStorage
. These sections for the corresponding export type have a structure analogous to the storage definitions in the Device
table in V6/V7, and the structure is always the same.
DeviceType
- storage type, possible values are onlyStorageFileHierarchy
andStorageAzureBlob
DeviceRank
- repository index (positive integer 1..32767) used to mark exported records. To keep track, it is advisable to use the same number as used in V6/V7 in the definition of thestorage
device
StorageFileHierarchy¶
This repository stores data in subfolders of the root folder, with the file stored two levels down so that the first two characters of the file ID are used for the first level and the second two characters for the second level. Files always have a .bin
extension. The root folder is configured with the RootDirectoryPath
parameter.
StorageAzureBlob¶
This stores data in the “Azure Storage Account”, more precisely in the “Blob Storage” container. Two parameters configure access to the storage:
ConnectionString
- “SAS” (Shared Access Signature) read/write/write access stringContainerName
- container name
Storage:

Container:

Creating a SAS access token:

Running¶
An example of exporting to StorageFileHierarchy
and checking the result.
The program gradually lists the progress. After the export has been performed, the records are always marked in the database. The program can be interrupted and restarted at any time; it will continue where it left off.

Methodology¶
Possible uses are either backing up binary content or preparing for V3 to V6/V7 migration. During migration, it is assumed that all binary data is exported sequentially. After their verification and possible backup of the V3 database, it is assumed that the binary data for records with the DeviceRank
value set will be deleted. For voice recordings in file storage, there is no need to delete anything in the database. If the VoiceRecord.RecordData
column was used for storage, its contents are deleted according to the marking in CallState
. After that, shrink
(database operation, making it less fragmented) and the migration scripts are applied. It is then transferred to the target database machine.