Move the QuerySurge™ Database Data Directory (Windows)
1) Make sure all users are out of the system and that no Scenarios are executing.
2) For the following steps, log into each QuerySurge deployment box as Administrator.
3) Navigate to the Windows Services console (services.msc).
4) Using the Windows Services console, stop the QuerySurge services in the following order (whether they are on the same box or different boxes):
a) Stop QuerySurge Agent
b) Stop QuerySurge Statsmon
c) Stop QuerySurge Tomcat
d) Stop QuerySurge MySQL
The console will show the Status for each of the four QuerySurge services as blank:
Note: While a database shutdown from the Windows Services console almost always leaves the data files intact, it is safer to use the "slow shutdown" procedure, which is described in our article QuerySurge Database Backup Procedures; see the section "Notes on QuerySurge Backups".
5) In your QuerySurge installation directory, find the mysql directory (<QuerySurge Install Dir>\QuerySurge\mysql).
6) In this directory, find the my.ini file. Make a backup copy of this file.
7) Open the my.ini file in a text editor. You may need to run the editor as Administrator in order to edit the file.
8) Search the file for: datadir. The default entry is:
datadir="C:\Program Files\QuerySurge/mysql/data"
9) Edit this file carefully; Modify the datadir entry to the new data directory, where you will be moving your database files. Note that your entry must follow the same forward-slash and back-slash pattern as for the original datadir entry. In the following example, we have modified the datadir entry for a directory on the D: drive:
datadir="D:\QuerySurge/mysql/data"
10) Continuing with this example, create a QuerySurge directory on the D: drive. Under the QuerySurge directory, create a mysql directory. Under the mysql directory, create a data directory by copying the entire data directory from your current installation directory (default is "C:\Program Files\QuerySurge/mysql/data").
11) Using the Windows Services console, start the QuerySurge MySQL service:
If the database has started, then the notation “Started” or "Running" should appear in the Status column.
12) If you have not edited the my.ini file correctly, the database should not start. If the database fails to start, check and fix your edits and try starting the database again.
If you cannot start the database, revert back to your copy of my.ini (from step 6), and start your database. Contact QuerySurge support. (You can create a helpdesk ticket from within QuerySurge itself, or on the QuerySurge website, www.querysurge.com.)
13) Once the database has started, start the remaining QuerySurge services in the following order:
a) Start QuerySurge Tomcat
b) Start QuerySurge Statsmon
c) Start QuerySurge Agent
14) Log in to QuerySurge as a final check. Your QuerySurge database data directory should now be changed to the value you entered for datadir in my.ini.
Note: If you are moving your QuerySurge database data directory to another disk location because of disk space concerns, it may make sense to move the database tmp directory as well. See this article for details.
Comments
0 comments
Please sign in to leave a comment.