Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to use mysqldump with the -T function and somehow compress it in one step, to save writing the uncompressed files to disk (it's a really big database).

mysqldump -T/directory databasename 

This would just write all the files to /directory, but I'd like to send it directly into a .tar.gz archive. Any idea how?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

this isn't possible. using the -T option causes the mysqld server process (not the mysqldump process) to write to the specified directory. therefore, there's no stream to redirect through tar and gzip.

any particular reason you need tab delimited files?

share|improve this answer
    
We're using them for possible import into another type of database later on. –  Mike Aug 17 '12 at 18:15
    
ok then, not possible. you'll either have to come up with a completely different solution, or live with compressing the files after the fact. –  longneck Aug 17 '12 at 18:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.