moving the db backups from one server to the other

  • I need to move the backups taken from our prod databases from server A to server B. This includes Full , Diff and transactional log backups . The frequency of the backups is as less as 45 mins.

    I was wondering how this can be done. Ony the .bak and .trn files needs to be moved over from server to server B as the backups happen. Is there a way that we could do this as part of the back jobs?

    Thanks,

  • Is this a one shot or something you will be doing a lot?

    If it is a one shot then the best way is to generate a full backup and copy then restore that.

    If this is something you will be doing regularly it might make sense to look into Log Shipping..

    CEWII

  • You could use command shell (but it's hideous) so I'd suggest a Windows scheduled task running either vb script or DOS batch file.

  • The action is not being performed to obtain high availability/ disaster recovery but its something which involves netwrok usage on server A where the db reside.

    A little help about how to copy the files from Server A from folder FA to Server B to folder FB might help.....I am new to dos scripting so liitle help is appreciated...

    Thanks.

  • Elliott (7/2/2009)


    Is this a one shot or something you will be doing a lot?

    If it is a one shot then the best way is to generate a full backup and copy then restore that.

    If this is something you will be doing regularly it might make sense to look into Log Shipping..

    CEWII

    Or you can use a OS Cmd step in a SQL Server Agent job to move the files.

  • I would recommend using Robocopy - and specifying the correct options to either mirror (folders on each server will be synchronized - remove a file from one, it will get removed from the other), or you could use the option to move the files, or any number of other options.

    It really depends upon what your goals are.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • If I were to run ROBOCOPY, then is this the correct way to do it....

    robocopy \\serverA\C:\Backup \\serverB\C:\backup

    I placed the above syntax in one of the jobs under cmdexec type....

    the source files are in the folder 'backup' of Server A and I wish to copy them over to 'backup' on Server B.

    I get an error saying that the file path does not exist ( both path do exist) is this some security issue where the rights needs to be fixed..

    Thanks.

  • Where are you running this? The UNC path would be:

    \\SERVERNAME\{share name}\Folder - where {share name} is going to be the hidden admin share for the C: drive. The hidden admin share is C$ - so your UNC path would be:

    \\SERVERNAME\C$\Backup

    If you are running this from ServerA, I would use:

    Robocopy C:\Backup \\ServerB\C$\Backup

    There are other flags available for mirroring/move/etc... which you probably need to consider. You get the help for that by running:

    Robocopy /?

    Again, are you moving these files or copying them? Why do you need to copy the files? This will tell you what flags to use with robocopy.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thanks for the reply. I plan to make a COPY of the files and the copying would done every night. Once the copying is done I plan to delete the source copy (with the lep of maintenace plan) that I plan to do later....

    since the copying is done every night I plan to run the job which could copy all the diff backs from the folder (FDBKP) from source to destination and then other step which would copy the transactional logs from the folder (TLBKP) from source to destination.

    Update:

    I get the following message when I run this from Server A :

    The process could not be created for step 1 of job 0x68179BA0A498574195619C0D327D4965 (reason: The system cannot find the file specified). The step failed.

    The source file and destination file both exist

    Here is the command that i used:

    Robocopy F:\Backup\DB1 \\ServerB\F$\DB2

    Thanks.

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

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