Excerpt |
---|
If your HDD is almost full, delete (or export) the old logs data and optimize the MySQL disk utilization. |
Table of Contents |
---|
Introduction
Warning |
---|
This guide include some suggestions in order to keep safe and clean your xCally database. We strongly recommend you to refer to your DBA before doing any operations on the database. |
To perform the following queries and commands, you can use the mysql command line or a MySql client such as WorkBench or SQLyog, etc..
First of all, backup the data!
Perform a database dump is not a complex operation, but you need to know which is exactly the database size because you will need enough space to save the dump file.
You can get the DB size by running the following query
Code Block | ||
---|---|---|
| ||
SELECT table_schema "Data Base Name",
SUM( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB"
FROM information_schema.TABLES
GROUP BY table_schema ; |
Once you know how many hdd space you need to save your dump file, you can proceed to backup the database. In this example we use the MySQL command mysqldump.
Code Block | ||||
---|---|---|---|---|
| ||||
mysqldump -u root -p xcally > xcally_dump.sql |
and enter the MySQL root password.
When the dump will be completed, you'll find a file like follows
Code Block |
---|
-rw-r--r-- 1 root root 16084420 Nov 7 12:19 xcally_backup.sql |
Page Properties | ||
---|---|---|
| ||
|