backing up to network device + deleting weekly

  • Hi,

    I'm trying to setup backups to a network device (sp_addumpdevice) or UNC, whichever, on a nightly basis for multiple databases but also have those backups be deleted weekly.

    Any idea of how do to this? I've been doing research and can't find a definitive way

  • i'd set up a maintenance plan instead and have it clean up after 7 days. you can also configure it to do a lot of the preventative maintenance that should be done anyway.

  • I couldnt' get my maintenance plan to let me backup to a network drive

  • what version of SQL are you running? just for kicks, i verified that i could do it in sql05 sp2...

    when creating the backup task in your maintenance plan, where it asks you for the file location, don't hit the button that brings up a file location dialog... just type the unc into the text box.

  • sql 2000, sp4 ....

  • you should still be able to do it. a couple of things to look at:

    1. does the user that you're running the backup as (if you're running as a job, check both the job owner and sql agent service account) have access to the unc path?

    2. does it work if you map the drive first and then back up to the mapped drive?

    3. if you click start|run and type the unc and hit enter, does it take you to the correct folder?

    are you getting any error messages? if so, what are they?

    edit: try running the backup in a query window... if it works there, then it's likely a security issue. are you running the sql agent service as a domain account or localsystem?

  • Lenny (8/20/2008)


    2. does it work if you map the drive first and then back up to the mapped drive?

    You cannot backup to a mapped drive. You must specifiy a UNC path (at least for S2K), and as Lenny alluded to, your account running SQL or SQL Agent must have rights to the remote share.

    -- You can't be late until you show up.

  • yea this was one of those dumb moments..I forgot that yesterday the Maintenance plan didn't work before I changed the account to be a domain account..it works now..thanks all

  • actually, what i was hoping to find out is whether or not it worked. if it did, that takes the troubleshooting down a whole different path.

    it's SUPPOSED to work to a unc, but it's not, but if it works to a mapped drive (even though it's not supposed to) would mean something else entirely.

  • awesome... never mind about my last post then... 😉

Viewing 10 posts - 1 through 9 (of 9 total)

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