Schedule backup for MSSQL to remote computer

If you familiar with MSSQL maintenance plan and ever configured backup through this tool and you should know that to backup the MSSQL database to remote computer, you have to configure Log On setting from services.

Okay, today we assume that we couldn’t allow to change the setting from Log On setting and wish to set the schedule backup, we could use maintenance tool and batch command to schedule it.

Firstly, create a maintenance plan from MSSQL, then select “Back Up Database Task”. From Database(s) option, select your database name, you may specify the directory that wish to backup. From this article we make it to C:\mssql\backup\.

Next, create a batch file named mssql_backup.bat and insert command as below.

xcopy C:\mssql\backup "\\remote_server\c$\backup" /e /i /h /y

Where remote_server is your remote server name and you would like to place it to C:\backup.

Lastly, create Windows Task Scheduler and configure the mssql_backup.bat to run daily or weekly as your wish.

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.