Backup to local device

  • I have a SQL Server (2008 R2) instance on a shared server. I want to backup the database (s) to a local workstation (or different physical location other than current server). When I try to backup the options for a device are the C: or D: drives on the shared server. How do I create a backup device on my workstation for the backup, or just back up to the workstation file/folder?

    Thanks in advance.

  • You can't choose a network path, but you can type/paste it in to the GUI screen. The you can choose "script" to get the code behind the gui and save/modify it for next time.

  • BACKUP DATABASE databasename to disk='c:\databasename.bak'

  • shashianireddy 30786 (12/26/2013)


    BACKUP DATABASE databasename to disk='c:\databasename.bak'

    That will not work to produce the backup on any machine other than the server itself. You have to use a UNC to a viable share if you want it backup to the drives of another machine or have Windows setup to recognize it as a "drive" and I'm not talking about just attaching a network share as a local drive.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks to all. the resolution I came up with was to create a backup device that pointed to the network location and backed up the database to the backup device. Although this particular situation was a single need, this probably is the best way when the possibility of scheduled backups is appropriate.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply