Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

backup to network share Expand / Collapse
Author
Message
Posted Wednesday, December 20, 2006 8:11 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Sunday, August 4, 2013 11:06 AM
Points: 397, Visits: 548

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

Post #331808
Posted Wednesday, December 20, 2006 10:16 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 12, 2014 12:05 PM
Points: 1,190, Visits: 601
Backup database pubs to disk = '\\servername\c$\pubs.bak' with init

MohammedU
Microsoft SQL Server MVP
Post #331859
Posted Wednesday, December 20, 2006 12:57 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, October 2, 2013 2:46 PM
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.
Post #331901
Posted Thursday, December 21, 2006 12:30 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:20 AM
Points: 1,616, Visits: 1,544
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 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #332280
Posted Thursday, December 21, 2006 2:18 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, June 22, 2014 6:53 PM
Points: 967, Visits: 388

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.

 

Post #332320
Posted Thursday, December 21, 2006 2:30 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:20 AM
Points: 1,616, Visits: 1,544

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 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #332324
Posted Thursday, December 21, 2006 2:58 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, September 12, 2014 12:05 PM
Points: 1,190, Visits: 601

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
Post #332341
Posted Thursday, December 21, 2006 3:15 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, June 22, 2014 6:53 PM
Points: 967, Visits: 388

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.

 

 

 

Post #332349
Posted Thursday, December 21, 2006 3:16 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:20 AM
Points: 1,616, Visits: 1,544

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 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #332352
Posted Thursday, December 21, 2006 3:21 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 8:20 AM
Points: 1,616, Visits: 1,544

>> 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 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #332354
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse