Search code examples
sql-serverconfigurationdatabase-administrationsystem-administrationmaintenance-plan

How to copy database backup (created by maintenance plans) files to remote machine


I would like to copy backup files after MS SQL Server maintenance plan to a new shared folder in another server. How to do that??


Solution

  • Here is the solution I used

    1- Create batch file with robocopy command

    ROBOCOPY C:\backfolder \\sharedserver\c$\backupcopy *.bak /S /purge
    

    2- Add new task to the task scheduler to run every day after the maintenance plan time Controlpanel >> Administrative tools >> Task Scheduler then add new task to run the batch file.