PDA

View Full Version : Backing up and compressing the database


Skavenger
03-07-2007, 10:20 PM
Hi, I'm actually using this command for backingup my database

mysqldump --opt -Q -u dbusername -p databasename > backupname.sql
But I is a little big for download, so, how can I make a gzip (is that right?)?

Is better to do the gzip after or at the same time I make the backup?

Thank you!

Skavenger
03-15-2007, 10:43 PM
Bump

Marco van Herwaarden
03-16-2007, 03:10 AM
There is no real best choice. I would prefer if it is done at the same time.

honestdave
03-16-2007, 03:23 AM
how does that compare to cpanel backups

PhoneiX
03-16-2007, 03:44 AM
tar cvzf file.tar.gz file_name => Compressses file

tar -zxpf file.tar.gz => Uncompresses tar.gz files

tar -xpf file.tar.gz => Uncompresses .tar files

gunzip file => Uncompresses .gz files

I don't now how to compress with gzip format. But you can use tar.gz instead of it.

honestdave
03-16-2007, 04:55 AM
damn. just did a cpanel backup and it won't load up our our test server because of vbseo. arrgh

EDIT: got it working. wow. it restored everthing perfectly. impressive work mr. cpanel backup. (we just had to set the site up on a subdomain to get around vbseo)