Problem Description
SQL backups fail with SQL9 (Backup job aborted) due to an invalid database file path. The backup may start successfully but fails while processing one or more database files.
Cause
This issue can occur if one or more SQL database files are configured with an invalid physical file path. Examples include:
Invalid directory syntax
Double backslashes (\\) in the file path
Trailing backslashes or spaces
File paths pointing to non-existent locations
Because the database file path is invalid, the backup application is unable to access the database file through the VSS snapshot, resulting in the backup failure.
Traceback
The following errors may be observed in the logs:
The filename, directory name, or volume label syntax is incorrect.
failed to get file stats DiskFilePath[...]
Error="Backup job aborted"
Resolution
Verify the physical file paths configured for all SQL database files.
Ensure the paths do not contain invalid characters, double backslashes, trailing spaces, or incorrect directory names.
Confirm that the database files exist at the configured locations and are accessible by SQL Server.
Correct any invalid paths and retry the backup.
Run the following query in SQL Server Management Studio (SSMS) to review the configured database file paths:
SELECT
DB_NAME(database_id) AS DatabaseName,
name AS LogicalName,
physical_name
FROM sys.master_files;
Once the invalid database file path is corrected, rerun the backup. The backup should complete successfully.
