Categories
Knowledge Support Support exacqVision Server Products

Linux – Delete Video from Root Volume

Exacq Technologies does not recommend using the root partition for video recording as the OS is installed on this partition.  Exacq labels the root partition as /mnt/edvr/0.  In the event that /mnt/edvr/0 has been enabled on the storage page,  resulting in video being recorded to the root partition and you now need to delete that video and prevent future recordings follow these instructions.

exacqVision files are stored on each drive enabled for recording in a directory structure beginning with YYYY (Year), see our KB: 393 exacqVision Video File Naming Format for additional details 

Knowing this we only need to concern ourselves with identifying the year folders which have been written to /mnt/edvr/0.  Once identified then they, along with their contents, including sub-directories can be easily removed. 

The basic steps are: 

  • Verify that future recording to /mnt/edvr/0 has been disabled
  • Open terminal and change to the mnt/edvr/0 directory 
  • Determine which Year folders have been created on /mnt/edvr/0
  • Delete the contents, of this year folders, including sub-directories
  • Empty the contents of trash
  • Close the Terminal Window 

In this screenshot mnt/edvr/0 has been enabled resulting in video being recorded to the root partition.  This is not recommended and should be unchecked to prevent recording to the root partition in the future.

Example of deleting video from the root partition (/mnt/edvr/0) and emptying the trash from the terminal

Change directory to /mnt/edvr/0 

$ cd /mnt/edvr/0

List contents of /mnt/edvr/0

$ ls
2021  psfpi

Remove year folder, in this case 2021 and it’s contents 

$ sudo rm -r 2021

Note if prompted enter in the OS root password and press enter.  There will be no visual feedback while you type. 

Empty Trash 

$ sudo rm -rf ~/.local/share/Trash/*

Exit Terminal 

$ exit
Categories
Knowledge Support Support exacqVision Enterprise Categories Products

Enterprise System Manager Shell

To open Enterprise Manager Shell in Windows, run Command Prompt as an administrator and change directories to the installation directory by running the following command:

cd C:\Program Files\exacqvision\enterprisemanager \enterprisesystemmanager\

Then type:

enterprisesystemmanager.exe shell

To open Enterprise Manager Shell in Linux, open a Terminal window and type:

sudo /usr/local/exacq/esm/enterprisesystemmanager shell

<br>

The following commands can be used in the shell:


Exit the Shell.

Exit with ‘Ctrl+Z’


Test SMTP settings

from evemail.models import EmailServer
es = EmailServer.objects.all()[0]
con = es.get_connection()
con.open()


You will see details about any connection errors, or an email connection object that is opened using the information in ESM.


Show the number of emails in the queue

from evemail.models import EventEmail, EventBatchEmail
EventEmail.objects.count()
EventBatchEmail.objects.count()


Delete emails in the queue

from evemail.models import EventEmail, EventBatchEmail
EventEmail.objects.all().delete()
EventBatchEmail.objects.all().delete()


Reset the Enterprise Manager Root Admin user password

*** This should never be given out to a customer ***

Stop all Enterprise Manager services, then enter shell. Once in shell, enter the following commands:

from organization.models import EnterpriseUser
u = EnterpriseUser.objects.get(username="admin")
u.set_password("admin256")
u.save()
import sys
sys.exit()

Start all Enterprise Manager Services

NOTE: It may be necessary to replace the field username=”admin” above with the actual username configured at time of installation, if not using default value. In example: username=”enterpriseadmin”


Deleting a Failover Group 

from failover.models import *
FailoverLog.objects.all().delete() 
FailoverGroup.objects.all() 

This will give you a list of failover groups.
Then you can delete the group at the proper index using 

FailoverGroup.objects.all()[0].delete() 

​Replacing the number with the index of the group to delete, of course 

import sys
sys.exit()

AES-70


Undeleting data removed using the web GUI

from server.models.core import Server
from django.utils import timezone
readd_date = timezone.now() - timezone.timedelta(days=2)
servers = Server.objects.filter(removalDate__gt=readd_date)
for server in servers:
    server.undelete()

Servers deleted through the GUI are flagged for deletion. As long as the datarolloff retention period has not passed, the servers deleted within the last 2 days can be undeleted with the above commands. You can adjust the days needed if the customer needs something from prior to that by adjusting the “days” number in line 3.

Categories
Knowledge Support Support exacqVision Enterprise Categories Products

How to delete a large amount of camera events from ESM

Description

Perform the following steps to remove a large amount of camera events from the ESM Postgre database:

<br>

Removing Events:

  1. Shutdown all ESM services
  2. Start command prompt as admininistrator (do not use powershell)

    Change directories to exacqVisionEsm\PostgreSQL\9.2\bin and run the following:

    pg_dump -U postgres –schema-only ESM > ESM.sql#
    psql -U postgres -d ESM
    DROP TABLE camera_cameraevent CASCADE;
    DROP TABLE report_eventid CASCADE;
    DROP TABLE event_alertid CASCADE;
    \q
    psql -U postgres -d ESM -f ESM.sql

    Note: There maybe many errors that some things already exist, which is okay
  3. Start all services

<br>

Recover the Schema (assumes current schema not intact):

  1. Shutdown all services
  2. Open pgAdmin
  3. Go to localhost > Databases
  4. Right click on “Databases” and select “New Database”
  5. Enter the name ESM2
  6. Open command prompt as admin
  7. Change directory to C:\exacqVisionEsm\EnterpriseSystemManager
  8. Enter the following commands:
    a. Installer.exe decrypt
    b. notepad EnterpriseSystemManager.tmp
    c. Change DefaultName to ESM2
    d. installer.exe encrypt
    e. installer.exe new_migrations
  9. Change directories to exacqVisionEsm\PostgreSQL\9.2\bin and run the following:
    a. pg_dump -U postgres –schema-only ESM2 > ESM.sql
    b. psql -U postgres -d ESM
    – 1. DROP TABLE camera_cameraevent CASCADE;
    c.psql -U postgres -d ESM -f ESM.sql

    Note: There may be many errors that something already exists which is okay
  10. Change directory to C:\exacqVisionEsm\EnterpriseSystemManager
    • Enter the following commands:
    • installer.exe decrypt
    • notepad EnterpriseSystemManager.tmp
    • Change DefaultName to ESM
    • installer.exe encrypt
    • Start all services
Categories
Knowledge Support Documentation Support exacqVision Server Products

Manually Deleting Log Files from Linux-based exacqVision Systems

It is possible for log files to become large enough to prevent proper access to an exacqVision system. If this happens, complete the following steps to delete the files manually:

  1. Restart the system.
  2. During the system startup process, press the Esc key to boot to shell.
  3. Type /usr/local/exacq/server/logs.
  4. Type ls -la for a list of files and sizes.
  5. Type less 'filename' to see the error.
  6. Type sudo rm 'filename'.
Manually-Deleting-Log-Files-from-Linux-based-exacqVision-Systems.pdf