How to Back Up the Database in Data Backup with AnySecura | User Guide
This guide will walk you through the essential process of backing up your AnySecura primary database, ensuring your critical configuration data is protected against corruption or loss. You'll learn how to safely detach and copy the database files, a fundamental skill for maintaining system integrity.
Building on that foundation, we'll also cover backing up the daily log databases, which record vital operational data. By the end, you'll be confident in securing both the core and historical data that keeps your AnySecura deployment running smoothly.
Backing Up the Primary Database
To prevent database file corruption or other incidents that may prevent the server from starting normally, it is recommended that administrators back up the database after configuring classifications and policies.
The main steps for backing up the primary database are:
- First, stop the AnySecura Server and any other programs using the OCULAR3 database.
- Open SQL Server 2000 Enterprise Manager or SQL Server 2005 Management Studio.
- Right-click the OCULAR3 database and select All Tasks → Detach Database.
- After successfully detaching the database, administrators can copy the primary database files—OCULAR3.mdf and OCULAR3_Log.LDF—to the backup directory.
- Once detached, the OCULAR3 entry will be removed from the Enterprise Manager. To restore the database, administrators need to select All Tasks → Attach Database and reattach the primary database in the Server installation directory.

The method above backs up the database by detaching it first and then copying the database files. Alternatively, you can stop the MSSQLSERVER service, copy the database files to the backup directory, and then restart the MSSQLSERVER service and the AnySecura Server. This achieves the same backup result.
Log Database Backup
Log data is stored daily in the DATA directory, which by default is located in the installation folder. Files are named by date. For example, for June 20, 2009, the files might include:
- OCULAR3_DATA.20090622.MDF
- OCULAR3_DATA.20090622_Log.LDF
- OCULAR3_DATA.20090622.X.MDF
- OCULAR3_DATA.20090622.X_Log
There are typically 2 to 10 files per day.
The main steps for backing up the log database are:
- Stop the AnySecura Server and MSSQLSERVER services.
- Copy the .MDF and .LDF database files to the backup directory.
- Restart the MSSQLSERVER service and the AnySecura Server.
