SQL Backup Script


SQL Backup Script

Author
Message
John-Michael Sugden
John-Michael Sugden
Forum Sage
Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)Forum Sage (17K reputation)

Group: Forum Members
Posts: 47, Visits: 500
Hello All,

A couple of years ago I created a batch/SQL script to backup databases from an SQL instance from a scheduled task. This script has been updated over the years so I am republishing my current version for use here.
--------------------------------------------------------------------------------------------
To use this Script:

Warning: This script is used at your own risk! If you are unsure of the procedure please contact P Squared \ Broadcast Radio Technical Support for assistance.

Note: This script can only be run on the machine running the SQL Server Instance. This script will not create backups from a client machine.

* Extract the folder "SQL Backup" from the zip file to where you want the backups. (Our Default is: D:\Psquared\SQL Backup)
* In the "SQL Backup\Scripts" folder edit SQLBackup.bat and set the backup directory to the appropriate folder. (Our Default is: D:\Psquared\SQL Backup)
* Set the Number of Days worth of backups you would like to keep. (Our Default is 7)
* Save and close the file.
* Create a scheduled task to run SQLBackup.bat every day as an administrator.

I recommend you test the back by running the scheduled task and checking that backups turn up in the SQL Backup\Backups Directory. You should find a dated folder and a 'Current' folder containing the backups.
--------------------------------------------------------------------------------------------
Hope this helps,

John-Michael Smile



Attachments
Script.zip (428 views, 2.00 KB)
Edited
8 Years Ago by John-Michael Sugden
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Select a Forum....





























Broadcast Radio Forums


Search