Manual Database Backup: Difference between revisions
(Added CentOS 7 commands) |
(Added TelcoBridges linux) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 10: | Line 10: | ||
<br> <br> | <br> <br> | ||
Here are other useful mysql commands | Here are other useful mysql commands: | ||
<pre>mysql –u tbdb –p tbdbpw | <pre>mysql –u tbdb –p tbdbpw | ||
use toolpack_3_1; | use toolpack_3_1; | ||
| Line 16: | Line 16: | ||
SELECT * from system_infos; | SELECT * from system_infos; | ||
SELECT * from mysql.user;</pre> | SELECT * from mysql.user;</pre> | ||
<br> | |||
To work with the MySQL service on CentOS 5:<br> | |||
<pre>service mysqld stop | <pre>service mysqld stop | ||
service mysqld start | service mysqld start | ||
ps -ef | grep mysqld | ps -ef | grep mysqld | ||
</pre> | </pre> | ||
<br> | |||
To work with the MySQL service on CentOS 7 or Telcobridges linux:<br> | |||
<br> Enable and start MariaDB | Enable and start MariaDB | ||
systemctl enable mariadb | systemctl enable mariadb | ||
systemctl start mariadb | systemctl start mariadb | ||
Latest revision as of 14:34, 13 June 2024
To backup the MySQL database, use the following commands (example is for major version 3.1):
mysqldump -u tbdb -ptbdbpw --opt toolpack_3_1 > toolpack_3_1_bk.sql
Then, you need to save the "toolpack_3_1_bk.sql" file in a safe place.
You can recover the database this way:
mysql -u tbdb -ptbdbpw toolpack_3_1 < toolpack_3_1_bk.sql
This procedure can also be used to make copies of similar configurations from one Toolpack system to another. The Serial Number of the Tmedia used must be updated after the new database is in place using the Migration tab. If the tab is not present, you can do it manually (contact support)
For scheduled backups, see Scheduled Database Backup
Here are other useful mysql commands:
mysql –u tbdb –p tbdbpw use toolpack_3_1; show tables; SELECT * from system_infos; SELECT * from mysql.user;
To work with the MySQL service on CentOS 5:
service mysqld stop service mysqld start ps -ef | grep mysqld
To work with the MySQL service on CentOS 7 or Telcobridges linux:
Enable and start MariaDB
systemctl enable mariadb systemctl start mariadb