SQL Backup and Restore to UNC

30 March,2013 by Jack Vamvas

A UNC (Universal Naming Convention)  mounts at any point on a logical drive. A UNC path is required if a DBA creates a  backup and restores from a UNC path.

I use UNC paths if disk space is limited on the server , and a storage administrator isn’t available to add another drive to the server with disk attached. I’ll create a  network share on another sever , create the SQL Server database backup , and  restore from UNC.

It can be much slower than straight to disk attached but it gets the job done.

--- Backup database to a UNC device . Note: \\server_name\drive_letter\path\file_name
 backup database My_DB to disk = '\\server1\H$\temp_backups\MY_DB.bak'


---Create a backup device . Useful if doing a UNC restore 
EXEC master.dbo.sp_addumpdevice  @devtype = N'disk', @logicalname = N'test', @physicalname = N'\\server1\temp_backups\MY_DB.bak'



-- restore from UNC
RESTORE DATABASE MY_DB
FROM DISK = '\\Server1\SomeShare\MyDatabase.bak'
WITH REPLACE, RECOVERY

 Read More

Backup file information needed for RESTORE - SQL Server DBA

SQL Server backup review with Powershell - SQL Server DBA

Database backup does not cause blocking

SQL Server – Predict the database backup size




Author: Jack Vamvas (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on SQL Backup and Restore to UNC


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer