TL;DR — Quick Summary
Aspel SAE backup and compaction errors: step-by-step fix for corrupted backups, multiuser locks, disk space, and database growing too large in SAE.
Aspel SAE is the most widely used administrative solution among small and medium businesses in Mexico, and two of its most critical operations are database backup and compaction. When either of these processes fails — whether through a direct error message, a process that freezes halfway, or a corrupted backup file — the business is left vulnerable to data loss. This guide explains the exact causes and the step-by-step solution for resolving these errors in SAE.
The Error
When attempting to back up or compact the Aspel SAE database, messages like the following appear:
- “Error al crear respaldo de la base de datos” (Error creating database backup) — when running the backup option from Utilerías.
- “La base de datos está siendo utilizada por otro usuario” (Database is being used by another user) — backup attempt in multiuser mode with active sessions.
- “Espacio insuficiente en disco para completar la operación” (Insufficient disk space) — the target drive does not have enough capacity.
- “El proceso de compactación no pudo completarse” (Compaction process could not complete) — compaction is interrupted before finishing.
- “Error al restaurar: el archivo de respaldo está incompleto o dañado” (Restore error: backup file is incomplete or damaged) — when trying to use a previously generated backup.
- The compaction process starts but freezes at a percentage (30%, 50%, 70%) without finishing.
These errors appear in both the Paradox/BDE database version and the Firebird version of SAE, although the specific causes vary depending on the database engine your SAE installation uses.
Root Cause
Errors when backing up or compacting the Aspel SAE database have several root causes:
1. Active users during the operation. This is the most common cause. Both backup and compaction require exclusive access to the database files. If any user — even one with a minimized or background session — keeps SAE open, the files remain locked and the operation fails. In multiuser environments, every workstation on the network must be checked.
2. Insufficient disk space. During compaction, SAE (through the Paradox or Firebird engine) creates temporary copies of the data files. The process needs at least twice the current database size as free disk space. A 500 MB database requires 1 GB free; if unavailable, the process fails halfway, leaving the database in an inconsistent state.
3. Insufficient Windows permissions. If the user running SAE does not have full write permissions on both the data folder and the backup destination folder, the process cannot create the temporary files or the final backup file.
4. Antivirus or Windows Defender blocking files. Antivirus software detects mass read/write operations on database files as suspicious and blocks access to .db, .fdb, .px, or .fbk files, interrupting the process.
5. Corrupted or heavily fragmented database. If the database has internal inconsistencies — caused by power outages, abrupt SAE shutdowns, or disk failures — compaction cannot complete. In this case, a repair operation must be run before compaction.
6. Backup saved directly to a network path. Attempting to save the backup directly to a network folder can fail due to latency, micro-disconnections, or insufficient permissions on the file server.
7. Backup does not include all tables. In some SAE versions using Paradox, if a table is locked by a background process, the backup is generated without that table, resulting in a partial backup that cannot be restored correctly.
Step-by-Step Solution
Follow these steps in order. Do not skip the prior backup even if the goal is precisely to fix the backup process.
Step 1: Disconnect all Aspel SAE users.
On the server machine, verify there are no active sessions. If SAE has an option to view connected users, use it. On client machines, check in Task Manager (Ctrl+Alt+Del > Task Manager) that no SAE.EXE or SAEW.EXE processes are running. In network environments, you can also check remotely:
tasklist /S CLIENT_MACHINE_NAME /FI "imagename eq saew.exe"
Step 2: Verify free disk space.
Open This PC and check the free space on the drive where the SAE database resides. The default location for data files is:
C:\Archivos de Programa\Common Files\Aspel\Sistemas Aspel\SAE8.00\Empresas
Add up the size of all .fdb (Firebird) or .db (Paradox) files in that folder. Multiply by two. That is the minimum free space you need on the disk before compacting or backing up.
Step 3: Run SAE as administrator.
Close Aspel SAE completely. Right-click the shortcut icon and select Run as administrator. Confirm the User Account Control (UAC) prompt. This gives SAE the necessary permissions to write to system folders.
Step 4: Temporarily disable the antivirus.
Before running the backup or compaction, pause your antivirus real-time protection. As a permanent measure, add the following folders as exclusions:
C:\Archivos de Programa\Common Files\Aspel\C:\Archivos de Programa\Firebird\(if using Firebird)- The SAE backup destination folder
Step 5: Generate the backup to a local path.
In SAE, go to Utilerías > Respaldo (or the equivalent in your version). Select a local folder as the destination — for example C:\Respaldo_SAE. Avoid network paths, USB drives, or externally-connected network disks. Click OK and wait for the process to finish.
Once the backup is generated on the local disk, you can manually copy it to the final destination (network, cloud, external drive).
Step 6: Run compaction.
With all users disconnected, sufficient disk space, and antivirus paused, go to Utilerías > Mantenimiento > Compactar base de datos (the exact path varies by SAE version). Click Start and do not interrupt the process even if it takes several minutes.
When complete, open the company in SAE and verify that customer catalogs, products, inventory, and recent invoices are correct.
Alternative Solution
If SAE’s integrated backup continues to fail, perform a manual copy of the database files at the operating system level.
Manual copy of .fdb files (Firebird)
- Open
services.msc(Win+R, typeservices.msc, Enter). - Find the Firebird Guardian - DefaultInstance or Firebird Server - DefaultInstance service.
- Right-click > Stop.
- Navigate to the SAE companies folder and copy all
.fdbfiles to a safe location. - Return to
services.mscand Start the Firebird service again.
This file-level copy is a completely valid emergency backup, although it is not portable between different versions of SAE or Firebird.
Command-line backup with gbak (Firebird)
If your SAE installation uses Firebird, the gbak tool allows you to back up the database directly:
cd "C:\Archivos de Programa\Firebird\Firebird_2_5\bin"
gbak -b -v -user SYSDBA -password masterkey "C:\...\Empresas\SAE80001.fdb" "C:\Respaldo_SAE\SAE80001.fbk"
To restore from that backup:
gbak -c -v -user SYSDBA -password masterkey "C:\Respaldo_SAE\SAE80001.fbk" "C:\...\Empresas\SAE80001_RESTORED.fdb"
Manual copy of .db files (Paradox/BDE)
If your SAE installation uses the Paradox engine (older versions), close SAE completely on all machines and copy the entire company data folder. There is no service to stop, but it is critical that no user has SAE open on any machine in the network.
Prevention
To prevent these errors from recurring:
- Schedule automated nightly backups. Use Windows Task Scheduler to run a
gbakscript during low-activity hours. Check your SAE version documentation for its built-in scheduler if available. - Establish a session-close policy. Require all users to close SAE before leaving. In network environments, configure an end-of-day reminder or notification.
- Monitor database size. If the database grows unexpectedly, investigate which module generates the most records and whether temporary data has accumulated and can be purged.
- Compact monthly. Schedule compaction once a month, preferably at month-end when the system has low activity.
- Use a UPS. Power outages during database operations are the primary cause of corruption. A UPS protects the server and client machines.
- Verify your backups. At least once a month, restore a backup on a test machine to confirm the file is intact and the data is recoverable.
- Add antivirus exclusions permanently. Permanent exclusions are safer than pausing the antivirus each time you run a backup.
Related Issues
| Issue | Likely Cause | Quick Fix |
|---|---|---|
| Backup generates a 0 KB file | Process was interrupted before finishing | Verify all users exited, repeat the backup |
| Restore error on another PC | Incompatible SAE or Firebird version | Use the same version number on both machines |
| Database grows too large without compaction | Deleted records remain as marked space, not freed | Compact monthly to recover actual disk space |
| Backup does not include some tables | Table locked by a background process | Restart Firebird service and ensure no SAE processes are active |
| ”Database is already open” error during compaction | Active SAE session on another machine | Find and close all SAE processes across the network |
Summary
- Before backing up or compacting, all users must close SAE — any active session locks the files.
- Compaction requires twice the database size as free disk space.
- Run SAE as administrator to avoid permission errors.
- Temporarily disable the antivirus or add Aspel and Firebird folders as permanent exclusions.
- If the integrated backup fails, manually copy the .fdb files with the Firebird service stopped.
- Never save the backup directly to a network drive — always use local disk as the first destination.
- Compact monthly and verify backup integrity by restoring on a test machine.