0

I am currently moving to a new server and have a Plesk backup file in Dropbox made with the Plesk Dropbox Backup extension, the .tar file is around 55GB in size.

I have downloaded it to the server into the /var/lib/psa/dumps folder.

The problem is I try to extract the tar file using tar xvf and the error I get is as follows:

tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now

Following extensive searching I have tried running bzip2recover and get the following error:

sorry, I couldn't find any block boundaries.

The problem I have is that I no longer have access to the old Plesk server where the backup is from so its essential that I can access the files from this backup file, there are around 100 sites in this backup file and only around 30 are being extracted before it throws up the error.

Is there any way around this?

  • Seems like a great point to decide to stop using horrible tools like Plesk. Honestly. – EEAA Apr 17 '16 at 20:22
  • 1
    Why are you trying to use a bzip recovery tool with a file using gzip compression? What does the 'file' command report the file type to be? – EEAA Apr 17 '16 at 20:24
  • File type is coming up as POSIX tar archive (GNU) – AppleTattooGuy Apr 17 '16 at 20:31
  • 1
    Well I'd guess your archive got truncated somehow. Try another backup file, perhaps. – EEAA Apr 17 '16 at 20:32
  • Thats the problem, this is the only backup file - is there any way around this? – AppleTattooGuy Apr 17 '16 at 20:34
2

It sounds a lot like you have misdiagnosed the problem a little bit, and consequently your question is most likely wishful thinking. You are not experiencing an issue with extracting the tar archive. Rather your problem is how you produced it in the first case.

There are a few steps you can take to confirm that the data is truly lost.

The error message indicates that your archive is truncated. What tar will do in case of a truncated archive is that it will extract whatever files it can and as much of the last file as possible. So you need to look carefully on the very last file extracted by tar. If that file has a valid name and the contents of the file are correct except that the extracted file was truncated, then you have confirmed that your archive is indeed truncated. You can compare the last few blocks of the last file to the last few blocks of the archive for an additional verification of this fact. Though do notice that in case your archive was truncated in the middle of a block, that partial block would not be included in the last extracted file.

Moreover compare the size of the extracted directory to the size of the archive. Since you did not use any compression for your tar archive, the sizes are expected to be similar. Since the overhead of tar is slightly less than most file systems, the total size of the extracted directory would actually be expected to be slightly larger than the original tar file. For a more accurate comparison of sizes, you can create a new tar archive from the extracted directory and compare the sizes of the two tar files.

If the extracted directory does in fact have the same size as the tar archive, then you can pretty much expect everything recoverable to be inside that directory.

You can still ask if there is any hope you may have missed some options. There is the very unlikely possibility that somewhere along the way a file header in the archive got corrupted in such a way that tar thought the file to be larger than it really was, and by pure coincidence it ended up still finding a valid file header after that.

This is extremely unlikely, but if it did indeed happen to you, then somewhere in the extracted directory you should be able to find a file which is larger than it should have been. If you do find an extracted file to be several GB larger than expected, you may be lucky enough to find some of the missing data inside it.

However it is already pretty much certain that your archive is truncated, and it is very unlikely for any of the metadata to have been corrupted in a way that would still allow tar to read through the archive and find it to have been truncated. So we can more or less already conclude that any data you are missing is due to the truncated archive.

In that case the conclusion is that of the 100 sites you wanted to backup, you did in fact only backup 30. And you do not have a backup of the last 70.

So we could restate the question as follows:

I need to restore 70 websites, but I don't have a backup.

Is there any way around this?

And when stated like this, the answer is obviously: no.

So what can you do now? You'll have to go back and find the machine with the original data. Because that is the only place where this data exists.

Other than that your last option would be to invent a time machine to go back and test your restores before it is too late. And I am afraid that this is just slightly more feasible than restoring data that you do not have a backup of.

-1

Are the files inside of the archive listed if you use tar tvf [Filename] ?

If your server was quite old, the format of the tar file could have changed compared to the one that your new Server uses. Using the option --posix or one of the others in the Archive format selection of the tar man page could help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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