Can a clustered server backup to unc

  • snomadj

    SSCarpal Tunnel

    Points: 4277

    my storage people want me to backup my databases to a unc path. Is this possible? Thank u.

  • John Mitchell-245523

    SSC Guru

    Points: 148769

    Yes, it's possible.  Do you have any reason for suspecting that it isn't?

    John

  • MVDBA (Mike Vessey)

    SSC-Insane

    Points: 21757

    100 % you can - all you have to do is make sure the unc path has the correct permissions for the account that is running the backup (normally the sql agent account)

    we back up to a UNC path on our network and it works fine

    also if you are using Redgate SQL backup there is an option to backup locally and copy it to a UNC path afterwards (although you can do this equally well with xp_cmdshell 'copy *.bak \\uncpath'  type of command - not recommended though as that means you have to enable xp_cmdshell

    if you want to script it then it looks like this

    BACKUP DATABASE [mydb] TO  DISK = N'\\myserver\myfolder\mydb.bak' WITH NOFORMAT, NOINIT,  NAME = N'mydb-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

     

    MVDBA

  • Jeff Moden

    SSC Guru

    Points: 996831

    MVDBA is spot on but I'll add that you MUST backup to a different physical machine than where your database files live.  If backup compression is available, definitely use it and make sure the "pipe" between your database machine and your backup repository machine is nasty fast and, possibly, a dedicated line with no other traffic on it.

    And, yes... DO take tape backups and get them well offsite as soon as possible.

    --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".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

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

  • snomadj

    SSCarpal Tunnel

    Points: 4277

    Thanks Gents, you've been super helpful.

    🙂

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

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