This article details how to move SAFR Server's object storage (known as CVOS or computer vision object storage)to a new location.  


For performance reasons, storing objects on an independent drive is recommended to ensure best performance.  SAFR records 100s of 1000s of events even on relatively small deployments.  For each event SAFR must store event image files (15-50k in size) as well as metadata objects (few bytes in size).  This volume of objects and the rate at which they are written can result in slow performance if not on a sufficiently fast drive or a drive busy with other activity.


Notes about object storage drive

  • Select drive with balanced read and write performance (new events are written to disk and remote viewers will cause simultaneous load to read large number of events from disk)
  • Select drive that is capable of handling the volume of events (Seek assistance from SAFR support on volume for your use case.  A rough approximation is 1-2 events per detected person/object).  More if you are performing other analytic such as direction of travel.
  • Drive should be formatted to handle the expected object sizes.  For each event, 1-3 images are stored ranging from 15 kb to 50 kb and for each image a metadata file with 50-100 bytes of data.
  • Drive should be free of other processes incurring load.  In particular, avoid allowing Windows Search or other processes that index or scan disk such as Virus protection software from scanning the CVOS Folder.  CVOS Folder is called cv-storage and stored in the SAFR Data directory (by default C:\ProgramData\RealNetworks\SAFR or /opt/RealNetworks/SAFR)


Note: The guide below is specific to Microsoft Windows. A similar process may be followed on Linux or macOS using Symlinks.


When to use this process


Ideally this process should be performed just after installing but before using SAFR.  This can also be performed on a working SAFR System but will require system be shut down and be offline for a short period as described below.


Performance Tips:

  • Uninstallation - If uninstalling SAFR (i.e. during testing),  SAFR may take many hours to remove the 100s of 1000s of files that are generated for events.  A quick way to reduce this time is to perform a Quick Format of the mounted drive storing objects prior to uninstallation.
  • Backup / Restore -  Assuming images are on separate system that is backed up independently, excluding images from backup/restore can greatly speed up the process.  During restore process, the drive may be unmounted and then re-mounted after restore to greatly speed up the time needed for restore.  A future revision to the backup/restore scripts will allow the object storage to be skipped to facilitate this.
    NOTE: Ensure images are backed up independently 


Step by Step Procedure

Below directions assume files copied to “D” drive and copied into ‘SAFR’ subfolder.  If new drive is dedicated to SAFR, remove the ‘SAFR” folder from all paths. 


1. Initial copy (with server running):

xcopy /e /i cv-storage D:\SAFR\cv-storage\


2. Shut server off (bin\stop.bat )


3. In Windows Explorer:

  1. Move all folders except “cv-storage” to D:\SAFR using Windows Explorer 
  2. Create a new folder ‘C:\ProgramData\RealNetworks_bakup’
  3. Move C:\ProgramData\RealNetworks\SAFR to this new folder


4. In Windows Disk Management Tool

  1. Open Windows Disk Management tool and mount the empty RealNetworks folder to the new drive as follows:
  2. Right click on the new drive and select “Change drive letter and paths”
  3. Click “Add” and choose “Mount in” option and select C:\ProgramData\RealNetworks
  4. Note: The RealNetworks folder must be empty to mount it


5. Restart SAFR Server ( bin\start.bat )

Note; Some newer images will be missing until remaining images are copied per below.


5. Clean up copy

xcopy /e /i cv-storage d:\SAFR\cv-storage\ /D /D:01-21-2021
  • Can’t specify with time unless you install tools like Robocopy or equivalent tool
  • Command will take few min (for 7d retention took 3 min) to scan thru older files so it may look  but its much quicker than