-------------------- pol_mysql_backup.bat -------------------- (c) 2010 Pictometry International Provided for use by Self-Hosted POL customers only ------------------- General Information ------------------- This script is provided for the purpose of backing up the MySQL database for Self-Hosted POL. It can be run manually at any time to perform a "hot" backup of the MySQL database. It is not necessary to shut down the SH-POL application in order to perform the backup. It is highly recommended that you use Windows Scheduled Tasks to run this script automatically on a backup schedule you are comfortable with. Each time this script is run to perform a backup, a new subdirectory will be created inside C:\mysql_backup. If the directory C:\mysql_backup does not exist, it will be created. The MySQL backup files will be created inside that subdirectory. Each backup subdirectory is named after the date and time the backup was run. For example, the directory C:\mysql_backup\20100128-141719 will contain files from the backup performed on 01/28/2010 (20100128) at 2:17:19 PM (141719). It is HIGHLY recommended that you back up these backup directories (to tape, network server, etc.) in accordance with your network backup policies, so that in the case of a hard drive failure on the SH-POL server, you do not lose the backup files along with the data in the live MySQL database. ------------- Configuration ------------- Before running pol_mysql_backup.bat for the first time, edit it and find this line on line 3 of the script: SET pwd=password Change "password" to the password for the MySQL "root" user. For example, if the MySQL root user's password is "abcd1234", this line should be changed to: SET pwd=abcd1234 ------------------ Running the Script ------------------ The script can be run by typing its name at the Windows command line, by double-clicking on the pol_mysql_backup.bat file, or by launching it from another process (for example, Windows Scheduled Tasks). No arguments are required, and the script does not require any user interaction. It will output its status as it performs the backup. If running it manually, you should see the following output: C:\>pol_mysql_backup.bat Backing up pol_user schema ... Backing up state_tables schema ... Backing up gis_layer schema ... Backup Complete. -------------------- Verifying the Backup -------------------- To ensure the backup completed correctly, navigate to C:\mysql_backup in Windows Explorer. You should see a subdirectory corresponding to the date and time the backup was run. Navigate to that directory and verify that the following files exist there and are not empty (have a size larger than 0KB): gis_layer.sql pol_user.sql state_tables.sql