Articles on: Maintenance

Backing up Clientexec with straight MySQL code

phpMyAdmin can not handle large databases so using straight MySQL code will help.

Change your directory to the directory you want to dump things to:

user@linux:~\> cd CE\_backup/

Use mysqldump (man mysqldump is available):

user@linux:~/CE\_backup\> mysqldump --add-drop-table -h mysqlhostserver
-u mysqlusername -p databasename (tablename tablename tablename) | bzip2
-c \> ClientExec.bak.sql.bz2

Enter password: (enter your mysql password)
user@linux~/CE\_backup\>

Example:
mysqldump --add-drop-table -h db01.example.net -u dbocodex -p dbwp | bzip2 -c \> ClientExec.bak.sql.bz2

Enter password: my-password
user@linux~/CE\_backup\>

The bzip2 -c after the | (pipe) means the backup is compressed on the fly. It does in one line the same thing that these two commands do:

mysqldump --add-drop-table -h DB.example.net -u dbocodex -p dbwp \> ClientExec.bak.sql
bzip2 ClientExec.bak.sql

Updated on: 23/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!