Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


backup to network share


backup to network share

Author
Message
sqlstar2011
sqlstar2011
Old Hand
Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)Old Hand (399 reputation)

Group: General Forum Members
Points: 399 Visits: 592

I would like to backup SQL Server DB's to a network share. Would someone share with me the exact syntax or show me an example how to accomplish that on 2005.

Thanks

Shahab


MohammedU
MohammedU
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1198 Visits: 812
Backup database pubs to disk = '\\servername\c$\pubs.bak' with init

MohammedU
Microsoft SQL Server MVP
Jason Hall
Jason Hall
Old Hand
Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)Old Hand (392 reputation)

Group: General Forum Members
Points: 392 Visits: 82
Make sure the account that is running the SQL Server service is a domain account that has write permissions to the network share you are writing to. If the account is LocalSystem it will not work.
Robert Davis
Robert Davis
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1702 Visits: 1623
You have a much higher likelihood of getting a corrupted backup this way. Back up locally and then copy or move to the network share.



My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master, SQL Server MVP
Database Engineer at BlueMountain Capital Management
Jeff Gray
Jeff Gray
SSC Eights!
SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)

Group: General Forum Members
Points: 971 Visits: 389

Robert,

Can you elaborate on that a little? I'm not sure I understand. It would seem to me that the method you suggest would be more likely to intorduce corruption, due to the additional I/O involved.


Robert Davis
Robert Davis
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1702 Visits: 1623

IO isn't the issue. The issue is the network. If there are dropped packets or a network glitch of some sort during the backup process, the backup either fails or gets created as a corrupted file. If you create the backup locally, a valid backup can be created without any intereference from the network.

Think of it like this. If someone on the other side of the room asked you to fill their water glass, would you pour the water directly into the glass (i.e. fill it locally) or would you spray the water across the room with a hose?





My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master, SQL Server MVP
Database Engineer at BlueMountain Capital Management
MohammedU
MohammedU
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1198 Visits: 812

Doing the local backup and copy the bak file to nework location is good idea but when you don't have the space, you have to use network backup....

If there is any issue in network backup job will fail. When the backup is running SQL sends the packets waits for aknowledgement from the host, incase on no aknowledgement backup job will report you as failure even it is completed 100%...

I am doing nework backups since 7.0 without any major problems...

If some ask the water on the other side of the room you can ask them to use the tap if there is any and if you have the switch for that tap you need on it...

I beleive network backup is like running the pipe for water...



MohammedU
Microsoft SQL Server MVP
Jeff Gray
Jeff Gray
SSC Eights!
SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)SSC Eights! (971 reputation)

Group: General Forum Members
Points: 971 Visits: 389

Still don't follow. You are still using the same "packet" thingys when you copy the file. So there is an equal chance for a dropped packet to cause corruption.

Now add in the fact that you must first place the file on the local machine, involving the disk controller and the drives, then go back and read the exact same data back from controller and drives, then shove it through the same network adapter, etc.

You've added a lot of places where corruption could occur. And as Mohammed indicates, the SQL server will know about the network problems during the backup. "Later on" is too late when the LSNs get updated for the next transacton log backup.

I'll stick with the direct-to-network approach. I've backed up 50 GB/day for 5 years over the network without a problem.

And I do test my backups regularly.


Robert Davis
Robert Davis
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1702 Visits: 1623

Yes, if space dictates backing up to a remote server, then certainly do so.

If the remote server is down, you can't make any backups at all without manual intervention. Using my method, if the remote server is down, and I can still create the backups locally.

I do my backups locally and then copy the backups to a remote store. I maintain 1 week's worth of backups locally and considerably more on the remote server.





My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master, SQL Server MVP
Database Engineer at BlueMountain Capital Management
Robert Davis
Robert Davis
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1702 Visits: 1623

>> Still don't follow. You are still using the same "packet" thingys when you copy the file. So there is an equal chance for a dropped packet to cause corruption.

Yes, but if corruption occurs, you still have a noncorrupted copy on the local.





My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master, SQL Server MVP
Database Engineer at BlueMountain Capital Management
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search