3

I have a .sql file created in Linux using:

mysqldump --opt db_name | gzip > backup_file_name.sql

I need to use it in Windows. 7-zip can open it, but when extracting, it says "Data Error in backup_file_name.sql. File is Broken." I also tried http://www.gzip.org/#exe and I can't get it to work. Any ideas?

1
  • Try under Cygwin's gzip. Commented Oct 12, 2011 at 3:27

2 Answers 2

5

I think the problem is that you're trying to open a .gz file, which is just a compressed single file, while 7-zip is designed for compressed archives like .tar.gz.

Try downloading gzip for Windows, then run:

gzip -d backup_file_name.sql.gz
2
  • I have, and the error is "incomplete literal tree. gzip: backup_file_name.sql.gz: invalid compressed data--format violated"
    – Obay
    Commented Oct 12, 2011 at 3:23
  • 2
    @Obay - Sounds like your file is broken. Commented Oct 12, 2011 at 3:24
0

You should probably name it backup.sql.gz. 7zip won't know what a .sql file is (even if it is gzipped internally).

1
  • I did. 7zip can open, but when extracting, it says Data Error, File is broken.
    – Obay
    Commented Oct 12, 2011 at 3:17

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