How to Move your Data Directory

How to get the most out of your CySight software.

How to Move your Data Directory

After Installation, you may find that you have under-allocated disk space or simply wish to move data to another partition for striping, raid or backup strategy.

1. Shutdown the MySQL and Digitoll services

Linux:

a. From the 'root' user command line run

#>crontab -e

and add a '#' in front of the 'digitoll.cron' line. This will prevent CySight from being restarted.

b. From the command line run

#>service digitoll stop

Wait until the process returns to the command line.

In some cases where flow data is large, this may take some time. If you are prepared to lose some data you can run

#>telnet localhost 30000

To quickly stop from within the CySight command line environment type

DigiToll>kill
After all digitoll processes are stopped please run

#>service mysql stop

Windows:

You can shutdown CySight services using the Menu options.
Alternatively, please shutdown Digitoll Server and DigiToll Monitor from the Services app.


2. Copy the data directory to the new partition

Linux:

The database directory by default resides in /digitoll/mysql/data/

On Linux rsync proves to be very useful in ensuring you dont miss files in a manual copy.
e.g.
#>rsync -va /digitoll/mysql/data /newdisk/

NOTE: The entire Data directory must be copied including all permissions.

Windows:

The directory is found under InstalledDirectory/MySQL/datadir.


3. Edit the my.ini (Windows) or my.cnf (Linux) file

Change the directory e.g. C:/Program Files/MySQL/MySQL Server ?.?/my.ini in Windows and /etc/my.cnf in Linux) datadir parameter to reflect the new Data directory

Linux:

You can find my.cnf in /etc directory

You will see lines similar to:

Code: Select all

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
#socket = /tmp/mysql.sock
socket = /digitoll/mysql/tmp/mysql.sock
default-character-set = latin1

# The MySQL server
[mysqld]
init-file = /usr/local/digitoll/conf/mysql_init.sql
port = 3306
#socket = /tmp/mysql.sock
socket = /digitoll/mysql/tmp/mysql.sock
datadir = /digitoll/mysql/data/
tmpdir = /digitoll/mysql/tmp/
user = mysql
Windows:

Search for my.ini and edit

Code: Select all


#datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"
datadir="D:/MySQLDataDir/Data/"
4. Restart MySQL service

Linux:

Restart the MySQL service

#>service mysql start

If the service fails then please also change the 'socket' to the same partition and attempt to restart as MySQL may require that both are on the same physical partition

Windows:

Use the menu to Start the Services or Use Services app. If using Services please only start the DigiToll Monitor service as it will automatically manage the startup of the DigiToll Server process. Do not change Service startup options. The configurations for Manual startup for DigiToll Server are on purpose.


Test that you can reach the MySQL service and database from the command line

#>mysql -u digitoll -pideadata
mysql>exit


4. Restart DigiToll service

#>service digitoll start


10. Check the logs to ensure no errors are occurring.

Logs are found in /digitoll/logs or under the LogBE directory in Windows

You can also run the CySight command-line shell to confirm. At the C-prompt or the Linux root shell run

#>telnet localhost 30001

You can watch the output and ensure no critical error lines appear. To exit type Ctrl+[ and press enter and quit from the telnet command line.


11. Monitor front-end to ensure you have data reaching the database

Check the Collection statistics
Check the data progresses


12. Linux Crontab

Please ensure after completing this process that you edit the crontab again to ensure the watch process is reactivated.

#>crontab -e

Remove the leading hash from the digitoll.cron line

Save and exit