Operating System - HP-UX
1833050 Members
2386 Online
110049 Solutions
New Discussion

my application corrupt after run tar cf - /usr/opt/TeMIPV500

 
asari
Occasional Contributor

my application corrupt after run tar cf - /usr/opt/TeMIPV500

I have done backup command using tar as follow:
tar cf - /usr/opt/TeMIPV500 | (cd /var/src/TeMIP_BACKUP/;tar xf -)

no result in backup path (/var/src/TeMIP_BACKUP/), but I find messages as follow...

[root@ovtemipd] --> tar cf - /usr/opt/TeMIPV500 | (cd /var/src/TeMIP_BACKUP/;tar xf -)
/usr/opt/TeMIPV500/tns_backup/bin/Dictionary.dat: file changed size
/usr/opt/TeMIPV500/tns_backup/bin/protoid.map: file changed size
/usr/opt/TeMIPV500/tns_backup/bin/tns_adv: file changed size
/usr/opt/TeMIPV500/tns_backup/bin/tns_browser: file changed size
/usr/opt/TeMIPV500/tns_backup/bin/tns_clerk: file changed size
/usr/opt/TeMIPV500/tns_backup/bin/tns_clerk_setup: file changed size
.
.
.

after that messages, my application could not be run any more.

anybody can help me how to resolve/restore my application?

Regards,
Asari
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

>>anybody can help me how to resolve/restore my application?

Sure. Restore from a backup run prior to this.

Suraj K Sankari
Honored Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

hi asari,

If your backup got corrupt then the right way is restore from the good copy of backup.

Suraj
asari
Occasional Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

For your note, that command make my application corrupted and no backup has been created.

Steven Schweda
Honored Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

> tar cf - /usr/opt/TeMIPV500 [...]

That was unfortunate. Give "tar" an absolute
path, and it will store absolute paths in the
archive. Then, you can "cd" to anywhere you
wish, but the next "tar x" will extract using
those absolute paths. In this case, that
will probably be on top of the original
files. For example:

dyi # tar cf - /root/src | tar tfv -
rwxr-xr-x 0/3 0 Oct 27 13:20 2008 /root/src/
rwxr-xr-x 0/3 70076 Mar 14 16:06 2008 /root/src/cct
rw-r--r-- 0/3 163 Mar 14 15:49 2008 /root/src/cct.c

It's almost always better/safer to use
relative paths with "tar". For example:

dyi # ( cd /root ; tar cf - src ) | tar tfv -
rwxr-xr-x 0/3 0 Oct 27 13:20 2008 src/
rwxr-xr-x 0/3 70076 Mar 14 16:06 2008 src/cct
rw-r--r-- 0/3 163 Mar 14 15:49 2008 src/cct.c

So, you can do this:

dyi # mkdir /root/dest
dyi # ( cd /root ; tar cf - src ) | ( cd /root/dest ; tar xf - )

And get this:

dyi # ls -lR /root/dest
total 0
drwxr-xr-x 2 root sys 96 Oct 27 13:20 src

/root/dest/src:
total 160
-rwxr-xr-x 1 root sys 70076 Mar 14 2008 cct
-rw-r--r-- 1 root sys 163 Mar 14 2008 cct.c


> [...] Restore from a backup run prior to
> this.

Apparently, you will need to do this. Then,
avoid using absolute paths with "tar".
asari
Occasional Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

Hi Steven,

I don't have any backup so I can't restore from the backup.
This is the first backup that will be used, but unfortunatly it is failed.

The questions are:
1. the problem can be resolved or not?
2. if can, could you pls provide me step by step to recover it?

regards,
Asari

asari
Occasional Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

Hi all,

any idea how to rollback what I have been done?

regards,
Asari
Dennis Handly
Acclaimed Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

>anybody can help me how to resolve/restore my application?
>any idea how to rollback what I have been done?

It's gone. :-(
You might want to invest in a foolproof backup product. Or use fbackup.
asari
Occasional Contributor

Re: my application corrupt after run tar cf - /usr/opt/TeMIPV500

as my support center suggestion, i will re-install application due to many complication if i do rollback process.

All, appreciate for your help and idea.

regards,
Asari