The events.db file is a SQLite database that stores event data used by the Reports tab in the CompleteFTP Manager. It records logins, logouts, file uploads, downloads, and other activity. Over time this file can grow very large, especially on busy servers, which can eventually cause "Failed to write events data" errors.
We do plan to add auto-purging of the database as a feature, but until then the solutions below can be used.
Option 1: Delete and recreate (quickest)
If you don't need historical report data:
- Stop the CompleteFTP service
- Navigate to C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Logs\
- Delete events.db (and events.db-wal and events.db-shm if present)
- Start the CompleteFTP service
A new, empty database will be created automatically.
Option 2: Selective purge using PowerShell
If you'd like to keep recent data while removing older records, we provide an interactive PowerShell script that walks you through the process. It shows the estimated file size for different retention periods so you can make an informed choice before deleting anything.
Download the script from our GitHub: Purge-CompleteFTPEvents.ps1
Prerequisites
The script requires sqlite3.exe, which is a free download:
- Go to https://sqlite.org/download.html
- Under Precompiled Binaries for Windows, download sqlite-tools-win-x64
- Extract sqlite3.exe and place it in the same folder as the script
Running the script
Open an Administrator PowerShell prompt and run:
.\Purge-CompleteFTPEvents.ps1
The script will:
- Locate the events.db file automatically
- Show the total number of records and the date range
- Offer to back up the database before making changes
- Show estimated file sizes for different retention periods
- Let you try different values before committing
- Stop and restart the CompleteFTP service as needed
Example output
--- Analyzing database ---
Total event records: 2,022,649
Date range: 2025-09-19 12:16:34 to 2026-03-23 12:10:04
Database size: 841.7 MB
--- Choosing retention period ---
Estimated database size for different retention periods:
Keep Records kept Est. size Reduction
---------- ------------ --------- ---------
30 days 341,113 ~ 142 MB -83%
60 days 658,956 ~ 274 MB -67%
90 days 997,876 ~ 415 MB -51%
120 days 1,339,432 ~ 557 MB -34%
180 days 2,019,408 ~ 840 MB -0%
All 2,022,649 841.7 MB
Automated/scheduled use
For unattended use (e.g. via Task Scheduler), run with -DaysToKeep and -NonInteractive:
powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\Purge-CompleteFTPEvents.ps1" -DaysToKeep 90 -NonInteractive
Option 3: Disable event recording
If you don't use the Reports feature and want to prevent events.db from growing at all:
- Open the CompleteFTP Manager
- Select the top-level server node
- Uncheck Event recording enabled
- Apply the changes
With event recording disabled, you can safely delete the events.db file while the service is stopped. It will not be recreated unless event recording is re-enabled.