PDA

View Full Version : File size limit prevents mysql db restore scheme


pkuharic
07-06-2006, 09:32 PM
Hello,

i am a generally satisfied futurequest account holder.

however i have been stymied in what i think would be the most elegant solution to the problem of a *secure* and *large database* mysql backup and restore procedure.

the procedure:
step 1. login securely using ssh
step 2. to create a backup of my large (300 MB+) mysql database, type:
mysqldump -uusername -p -hhostname -q databasename | bzip2 -c > sqlbackupfilename.sql.bz2
step 3. download sqlbackupfilename.sql.bz2 using a secure ftp client to my home computer
step 4. IN THE EVENT OF A NEED TO RESTORE:
upload sqlbackupfilenamesql.bz2 to my futurequest server using secure ftp client
step 5. login securely using ssh
SO FAR SO GOOD
step 6.
Here is where there is a problem:
the intention is to decompress sqlbackupfilename.sql.bz2 using
the following command:
bzip2 -d sqlbackupfilename.sql.bz2
however i get the following error:
File size limit exceeded
note: i have read on the forums that there is a 75 MB limit? note, my db is about 300MB hence the error
step 7.
if i could avoid the error in step 6 i could restore the db using:
mysql --host=hostname --user=username -p databasename < sqlbackupfilename.sql

---

now wouldn't the above be a great way to 100% securely backup and then restore a large database?

is there any possibility to request a temporary lift of the file size restriction? is there for a good reason?

thanks...

kitchin
07-06-2006, 10:27 PM
I guess you know that file is just a bunch of statements and it can be broken up, carefully, into smaller files. Not so convenient though, esp. if the data must be fixed all at once.

Kevin
07-06-2006, 11:58 PM
Instead of doing:
bzip2 -d sqlbackupfilename.sql.bz2
mysql --host=hostname --user=username -p databasename < sqlbackupfilename.sql
do:
bzip2 -cd sqlbackupfilename.sql.bz2 | mysql --host=hostname --user=username -p databasename

pkuharic
07-08-2006, 04:13 PM
awesome thanks.
so i guess my title for this thread was a mistruth!