Restoring database

  • Hello,

    I am trying to automate my code by restoring once a week database from one server to another, this is my plan:

    1.Create back up,

    2.copy back up from one server to another

    3.restore backup to the server.

    How can I do it,can any one recomend it any expereince with it?

    Thank you

  • have you tried these things from creating sql jobs?

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • No, I have like 20 different databases, is there way to copy everything what we have on one server to another server?

    Thank you

  • Use an XCOPY or ROBOCOPY script to copy the backup files. The script can be launched either from a SQL Job, SQL Mainanance Plan or a Windows Task Scheduler job.

  • You can actually automate robocpy to automatically transfer your backup files when the backup completes. Did this at a previous employer to move backup files to an off-site file server. Worked great (and is still working), just don't ask me how I did it as that was over 4 years ago when I set it up.

  • It's not necessary to copy backup file from server to server. If your destination SQL server has access to source server, you can restore accross servers, by specifying "...from disk = '\\server\share\file.bak'" or "\\server\C$\folder\file.bak'.

    This way you will waste less resources.

  • SQL Guy 1 (4/10/2013)


    It's not necessary to copy backup file from server to server. If your destination SQL server has access to source server, you can restore accross servers, by specifying "...from disk = '\\server\share\file.bak'" or "\\server\C$\folder\file.bak'.

    This way you will waste less resources.

    I'll throw in an "It Depends" here. Depending on your network, it may actually be faster to copy to a local drive then restore than to restore over the network. I had that issue at a couple of previous employers.

  • Thank you

  • Have you thought of an alternate solution like SQL replication, infacts merge replication is good way to go. create publisher/subscriber, then schedule it to synchonize once a week?

  • haiao2000 (4/11/2013)


    Have you thought of an alternate solution like SQL replication, infacts merge replication is good way to go. create publisher/subscriber, then schedule it to synchonize once a week?

    Why? This affords the opportunity to test the backups to ensure that a restore is possible. Remember: backups are worthless, restores are priceless.

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

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