This article explains how to backup MS SQL Server data with Backup4all using a scheduled task. The database files are locked by the MS SQL Server. In order to backup these files and avoid data corruption, it is necessary to perform some actions.
On this page:
The database files are locked by the MS SQL Server. In order to backup these files and avoid data corruption, it is necessary to perform these actions:
- Stop the MS SQL Server.
- Perform the backup.
- Restart the MS SQL Server.
To automate the process described above, a backup needs to be configured in Backup4all that will automatically stop the MS SQL Server, perform the backup and restart the MS SQL Server. The MS SQL Server will be stopped/restarted using specific commands in the Run action before/after backup sections of Backup Properties -> Advanced page.
How to configure the backup in Backup4all
Steps needed to configure the backup:
- Open Backup4all and select File -> New Backup (Ctrl+N).
- In the Where do you want to save the backup? section, you can select the backup destination. Click Next.
- On the What do you want to backup page, add the MS SQL Server data to be backed up. You will have to select both the .mdf and .ldf files from the Data folder. Click Next twice.
- On the How do you want to backup page, you can choose the backup type and the encryption. Mirror is recommended. Click Next.
- On the When do you want to backup page, you can set the backup job to automatically run on the specified time and days. Press Next.
- On the Personalize your backup job page, enter a name for the backup in the Backup name field.
- Press Advanced mode button.
- Go to Advanced page:
- In the Run action before backup section set (check) the Run program or action option and type: net stop MSSQLSERVER.
- In the Run action after backup section set (check) the Run program or action option and type net start MSSQLSERVER.
- Check the "Success", "Warnings" and "Errors" options.
- Click Save.
Video Tutorial MS SQL Server data backup:
- Backup4all 5.x - 8.x
- MS SQL Server 2000-2008