In general you should at this point be very carefully what you do. Because your diskstorage is about to die. If you do another 10 or 20 tests then the disk maybe finally dead beyond any affordable repair.
The most important thing to do, is to create an exact 1:1 copy of the problematic disks. If you have that, make another copy from those new created disks. The last disk(s) are the working copy. There you can do experiments with and if the experiments fail. you can create another set of working copies.
Maybe it's time to hire a specialist, who can handle such a situation - depends of course on how important your data is for you.
Quote:
Is there a way to know if the tar file test.tgz has files which had problems ?
(I'm not quite sure if AIX-tar works equally like the linux tar, but it may help.)
You can try a test-run with tar(Watch at dash before tvf, which is different from your command):
You should see filenames running on your console. When tar stops because of the error, all missing files may be lost.
That's the only thing I can say to this.
Other options require additional work at setup-time of your backup. That would indeed be a good idea for a change for your backup procedures. (Instead of tar, you can use cpio with "CRC"-Format, which is checksumming your data. You can create checksums manually for all backed up files before the backup.
Is there a way to know if the tar file test.tgz has files which had problems ?
I have already said it and i will repeat it here: THIS IS NOT A TAR-ERROR! It is an error reading the disk, tar just reports that error.
What you need to do includes: repair the filesystem (which might well be beyond repair), get another disk, recreate the correct contents of the file somehow (maybe database methods might help, like rolling back archive logs, etc.).
Look: you have a file and some part of that file is not readable, because it is damaged. Regardless of the tool you use to read it - cat, tar, cpio, whatever - all these tools will fail for the exact same reason: some part of the file is not readable. If you give a book to someone and he complains that page 245 is missing you are not going to "correct the persons reading" - you need to provide the missing page for the complaint to go away. For the same reason there is nothing you can do with tar or the file it produces, only with the reason for the error it reports.
sorry, if my question was misunderstood, what i meant was, how to check if a tar file has all the files in it without any errors / problems
My question : How can a user find out if his/her tar file has some files with errors/problems or no errors/problems
OK, i indeed have misunderstood the question. Sorry, my bad.
Well, there are diagnostic messages and a return code when you create the tar-file. These are always to be observed when creating an archive non-interactively (like inside a batch). In general it is good style to check return-codes in scripts, regardless of which command it is.
This is bad style:
this is better and safer:
If you take your tar-archive this way you will notice upon creation that something was rotten in the state of Denmark.
Now, if you only have the archive and restore files: you can't know (at least not for sure) if the content is corrupt or not. The content of a tar-archive are archived files. tar can find out if the archive itself is damaged (by taking and testing checksums), but if a wrongly read file is archived correctly it will be "correct" from tars POV.
Do you really believe that the Oracle database content is corrupt? Wouldn't you detect that in the Oracle error log for day-to-day operation?
I'm not an Oracle DBA but I used to have one work for me when I was a system manager. I remember that in the situation of potentially corrupt data inside the dB he would use an Oracle utility to 'export' all the database out to a flat file (this could take a long time if the dB was huge), empty the dB of data, and then import all the data back in. He would watch for errors during the export and the export utility would take care of most things.
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Dear all,
there are more than 10 files with .tar.gz extension in my folder i didnt want to extract them i just want to run the query to fetch my necessary data from all the files.
but when i run the command it untar the files in that folder.
gunzip -c abc.tar.gz | tar -xf - | grep REC |... (0 Replies)
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Hi
when use "tar cpvzf /dev/st0 --exclude=/proc --exclude-/lost+found --exclude=/mnt --exclude=/media --exclude=/sys /" to tape,
get the following message "tar: error exit delayed form pervious error",
What is the mean ? Please suggest some solution for these errors. thx (1 Reply)
Hi,
WHile decompressing the files, i get the error tar: directory checksum error. After decompressing when i check the size of file, it is less than the original file. Due to this error, there is loss of data. How can this error be removed?
Thanks in advance. (7 Replies)
When Im trying to untar a file I get an error message
tar: 0511-169 A directory checksum error on media; 804399248 not equal to 46325.
What can I do to untar my file
Thanks (3 Replies)
Hi
i am facing one problem with one file dxagent.ss, this file has most of the binary contents.
when i m running following command on unix machine
tar xpf dxagent.ss
output should be: removing leading '/' from members name. and should create 'usr' and 'var' directory.
but i am getting some... (5 Replies)
When I tried to decompress using TAR the following error was popped up..
tar: blocksize = 0
..Can anyone tell me wht this means and how to rectify this error... (3 Replies)