SharePoint backup error "Operating system error 21"

While running a backup on a SharePoint server, I received the error:  “Error: Object SharePoint_Config failed in event OnBackup”

I was running the following STSADM script:

@REM —– BACKUP Farm —–
@SET BACKUPFILEPATHFULL=D:\Backup\full
STSADM -o backup -directory %BACKUPFILEPATHFULL% -backupmethod full -quiet

The full error text from the spbackup file was this:

[5/18/2010 6:35:39 PM]: Verbose: Starting object: Farm.
[5/18/2010 6:35:39 PM]: Progress: [Farm] 50 percent complete.
[5/18/2010 6:35:39 PM]: Verbose: Starting object: SharePoint_Config.
[5/18/2010 6:35:40 PM]: Verbose: [SharePoint_Config] SQL Server Connection String: Data Source=sp-sql-external.sohema.com;Initial Catalog=SharePoint_Config;Integrated Security=True;Enlist=False.
[5/18/2010 6:35:40 PM]: Verbose: [SharePoint_Config] SQL command started at: 5/18/2010 6:35:40 PM. This command may take a while to complete and without notification.
[5/18/2010 6:35:40 PM]: Verbose: [SharePoint_Config] SQL Server Command: BACKUP DATABASE [SharePoint_Config] TO DISK=@db_loc WITH NAME=@db_name, STATS=5, NOINIT, NOSKIP, NOFORMAT, NOREWIND
    @db_name=SharePoint_Config, @db_loc=D:\backup\full\spbr00060000015.bak
[5/18/2010 6:35:40 PM]: Verbose: [SharePoint_Config] SQL command timeout is set to 1.00 hours.
[5/18/2010 6:35:40 PM]: Error: Object SharePoint_Config failed in event OnBackup. For more information, see the error log located in the backup directory.
    SqlException: Cannot open backup device ‘D:\backup\full\spbr00060000015.bak’. Operating system error 21(The device is not ready.).
BACKUP DATABASE is terminating abnormally.

The problem was that I was not using a UNC path as the backup directory.  The backup ran without any errors when I changed the path variable to a valid path:

@SET BACKUPFILEPATHFULL=\\SP-WEB1\Backup\full

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: