Support

Site Restoration

#24219 Invalid Header in Archive File, Part 1... (Recover corrupted archive?)

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by on Friday, 26 February 2016 17:20 CST

PaulAndrew
I'm guilty.
I get this error because I didn't check Filezilla's default transfer type before downloading my backups from godaddy to a "safe" off-site location (and to make space on Godaddy). I inadvertently used ASCII mode instead of Binary.

Invalid Header in Archive File, Part 1 88056157

It's a 2-part archive JPA and J01. 2gig and 900meg respectively.

I found fixzgz at www.gzip.org which others have used to recovered archives with the same problem. It didn't work for me I then searched for a good binary editor to attempt to locate the spot of error 88045157 and possibly remove the extra CR (carriage return) bytes inserted by the transfer.

Questions:
- Do you know of a good binary editor and do you think this might work?
- Kickstart did extract some files from which I may begin to rebuild the site. Do you think the files that were extracted are only from JPA? Or might some be from J01?
- Where is the database data stored in the archives and, if I have it extracted in some file, do you think I can recover it and get it into mysql somehow?
- Do you think it's worth trying to recover (using kickstart) other backups (which I have) further back in time in hopes of finding one where the ascii transfer didn't hurt it?

As you can see I'm desperate given the site will not be easy to re-build.

Any answers, ideas, thoughts, encouragement is greatly appreciated.

tampe125
Akeeba Staff
Hello Paul,

I suspect the real problem is not the ASCII transfer, Filezilla defaults to "auto" transfer mode (ASCII only for text files), rather than a log files was included.
If that happens AND during the backup it shrinks its size, the backup gets corrupted.
Sadly there's nothing you can do: all the following files are corrupted.

Regarding the database, you should be able to extract it, since these files are added at the beginning it's more improbable to get corrupted. You can find it inside the installation/sql folder, there are several files. These are plain SQL files that could be manually imported inside your database, please remember to replace #_ with your table prefix.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

PaulAndrew
Thank you Davide. Very helpful and encouraging.

Some related questions:
  • What did the end of your first sentence mean? "rather than a log files was included." Did I miss your explanation of what might have happened? If it wasn't an ascii/binary issue then maybe my earlier backups are good?
    If kickstart had a log file, where would it be and what's it's name?
    In the installation/sql folder there is:
    databases.ini (I understand this)
    52 site.s## files site.s01 thru site.s52
    site.sql
    The site.___ files are filled with lots of INSERT and CREATEs. Is it simply a matter of running all those commands in mysql? In what sequence? Is site.sql any different than the other files? Is it just the first one and therefor site.s01 is the second?


Thank you Thank you Thank you.

tampe125
Akeeba Staff
I meant: the problem is not caused by the transfer, but from a log file being included inside the backup archive.
You can create a log file of kickstart by opening it and changing the line from
//define('KSDEBUG', 1);
to
define('KSDEBUG', 1);

Anyway, it will simply tell you when the restoration stops, there's nothing we can do to fix it.

Regarding the .s** files, you're right: you can simply run them one by one to restore your database. Start from the .sql one and then follow the order (please remember to change #_ with your actual table prefix)

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

PaulAndrew
Thanks Davide.

How can I avoid having log files in the Akeeba backup? I don't work with log files in Joomla folders so I don't know where they are or what creates them.

I will work on the db tonight (EST) and let you know how it goes. Can I assume once I run those commands then the joomla backend will see all the data in their respective places? Menus, categories, content, modules (?) etc. etc. Is it best to run the SQL on a mostly empty joomla install? I ask because what if, for example, I have already loaded akeeba admin on the fresh install and the sql attempts to re-install a possibly older version. Can that even happen? I'm just trying to understand any gotcha's before I dig into it.

Thanks.

tampe125
Akeeba Staff
We always skip the log folder, to prevent issues like this.
The problem is that sometimes there are developers that are storing their log files in custom directories, so there's no way to really know the whole list of log files.
The best thing to do is to try to recreate the same site you had previously (same Joomla version, same extensions installed, same version of the installed extensions etc etc). Then import all SQL scripts to "automagically" import all the content.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

PaulAndrew
Wow. Okay. I'll try but I'll be surprised if I get all that right. I'll let you know.
You've been very helpful.

One last question. Aren't log files just text files? What makes them different from any other text file?

Thanks.

tampe125
Akeeba Staff
You're welcome!
The problem with log file aren't their contents, but their size. Since the will be heavily used, that's a common practice to truncate them if they get too large and start from scratch (usually you only need the latest info, if something goes wrong).
If the log file gets truncated during the backup, the archive gets corrupted since the size shrunk.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

PaulAndrew
I've now tried to restore two earlier backups. Each resulted in the same error but at earlier points.

As you can imaging I'm a bit nervous about running backups.

1. How can I be sure there aren't any large log files inside before running the backup? I could search the folders before running each backup.

2. I do have some very large files (user downloadable files). Several 4 meg pdf files and one 39meg executable program which users can download. The 39meg file and many (not sure if all) of the large pdf files were recovered in the last few failed kickstarts. Might these be a problem? They're not log files but they are big?

tampe125
Akeeba Staff
No, the problem is caused only when there's a file that gets truncated during the backup.

To be sure that the backup could be extracted, you can flag the option Archive integrity check. That will perform a dry extraction, so if there's a problem you could detect immediately.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

PaulAndrew
Thank you.

I have succeeded in finding a backup that doesn't generate this Invalid Header error and therefor must not have had a truncated file in it.

It may be helpful for others to know how I got past the Ajax errors which also occurred often.
First I followed the instructions by using FTP in Kickstart. Unfortunately that seemed to only delay the ajax errors to later in the extract. What I found was that the Ajax errors occurred when I had other significant traffic on my home/office network. Avoid high bandwidth applications on your network while running a kickstart recovery. I found that the same backup which had Ajax errors (still using FTP) would run fine overnight when no one else was on the network. So I ran them after everyone went to bed. This was important because my kickstart extracts took several hours.

Thanks for all your help.

tampe125
Akeeba Staff
You're welcome!

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!