I usually backup the database by mysqldump, but the plain SQL dump file was getting larger and larger and took most of the free space.
Finally, I found a solution to this problem. To backup the database, we can directly pipe the output stream to a zip file, no intermediate dump file involved:
[root@test ~]# mysqldump -u root -p'password' database_name | gzip > dump_file.gz
To restore the database, we can use the command to unzip the dump file and pipe the output stream to the database.
[root@test ~]# gunzip < dump_file.gz | mysql -u root -p'password' -D database_name
This could save a lot of space. In my case, the data compression ratio is around 10.