How to fix Error 3204 on Windows Server 2025 / Windows 11

SQL Server 2025 Error 3204: “The Backup or Restore Was Aborted”

Why This Error Happens

Error 3204 typically occurs when SQL Server encounters a media or device-level failure while writing to or reading from the backup destination. This is most commonly caused by insufficient disk space on the target volume, a corrupted or inaccessible backup file/device, or the SQL Server service account lacking NTFS write permissions on the destination folder. In some cases, this also surfaces when a backup is manually cancelled or interrupted by a network share disconnection mid-operation.

Step-by-Step Resolution Guide

Step 1: Verify Disk Space and Destination Path

  • Check the target drive (e.g., D:\SQLBackups\) for available free space using File Explorer or Get-PSDrive in PowerShell.
  • Ensure the backup path specified in your BACKUP DATABASE command actually exists and is not pointing to a disconnected network drive or stale UNC path.
  • If using a UNC path (e.g., \\BackupServer\SQLBackups\), confirm the share is reachable via Test-NetConnection BackupServer -Port 445.

Step 2: Validate SQL Server Service Account Permissions

  • Open Services.msc on Windows Server 2025 and note the account running “SQL Server (MSSQLSERVER)” or your named instance.
  • Navigate to the backup destination folder, right-click → Properties → Security tab, and confirm the SQL service account has Write and Modify permissions.
  • If missing, grant permissions using:
  icacls "D:\SQLBackups" /grant "NT SERVICE\MSSQLSERVER:(OI)(CI)F"

Step 3: Check for Antivirus or Backup Software Interference

  • Windows Defender or third-party AV on Windows Server 2025 can lock .bak files mid-write, triggering an abort.
  • Add an exclusion for the SQL backup directory and the sqlservr.exe process in Windows Security → Virus & threat protection → Exclusions.
  • Temporarily disable third-party backup agents (e.g., VSS-based tools) that may lock the same file handle during a scheduled job overlap.

Step 4: Rebuild or Re-Initialize the Backup Device

  • If using a named backup device instead of a direct path, drop and recreate it:
  EXEC sp_dropdevice 'MyBackupDevice';
  EXEC sp_addumpdevice 'disk', 'MyBackupDevice', 'D:\SQLBackups\MyBackup.bak';
  • Re-run the backup job and monitor the SQL Server Error Log (ERRORLOG in C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\) for correlating I/O errors (e.g., Error 823 or 824).

Alternative or Verification Steps

  • Run the backup manually via SSMS or T-SQL with WITH CHECKSUM, STATS = 10 to confirm it completes without aborting and to catch any hidden corruption early.
  • If the issue persists, redirect the backup to a local drive first (bypassing network shares) to isolate whether the root cause is storage-related or network/permissions-related.