Using the USBA database backup batch file
Back to Margin Maximizer Suite Backup Info
The USBA backup batch file script creates a backup of your database and generates two other batch files to be used for subsequent backup and restore operations. The USBA_Bkup.bat batch script is generated when you run usba_bkupdb_setup.bat and can be used to run subsequent backups of the USBA database.
Download and run the file
- Download the file usba_bkupdb_setup.txt to your database server
- Rename the file to usba_bkupdb_setup.bat(the extension was changed as some firewalls do not allow .bat files to be downloaded)
- Run the usba_bkupdb_setup.bat
- Specify the name of the server with the USBA database
- Specify the path where you want the backup files saved
- The script will then run and create a folder called backup in the path specified. The backup folder will contain the following files:
- USBA_Data.bak - backup of the database
- USBA_Bkup.bat - batch file for running additional backups
- USBA_backup.txt - backup commands called by USBA_Bkup.bat
- USBA_Restore.bat - batch file to restore database from backup
- USBA_Restore.txt - restore commands called by USBA_Restore.bat
- The batch files are for an MSDE (rather than SQL Server 2000) installation using the default database name (USBA_Data)
- All the batch files need to run under credentials that have permission to the USBA database.
- The MSSQL$USBA service must be running when the batch file is executed
- USBA_Bkup.bat renames the existing USBA_Data.bak to USBA_Data.old when it runs so one previous version of the database backup is retained.
Running backups with Windows Scheduler
- Open the scheduler from the Start menu - All Programs - Accessories - System Tools - Scheduled Tasks
- Select Add Scheduled Task to start the scheduled task wizard
- Click the Browse button to locate USBA_Bkup.bat and select the appropriate schedule
- Enter the User name and password for the task to run under (this account must have admin rights on the database server)
- Use your regular backup program to backup the USBA_data.bak instead of the actual database files (USBA_Data.mdf and USBA_Data.ldf)
Download the usba_bkupdb_setup.txt file
Remember to rename the file to usba_bkupdb_setup.bat after you save it to your server.