UnixPedia : HPUX / LINUX / SOLARIS: HPUX : HOW TO RECOVER FILE FROM IGNITE IMAGE

Saturday, August 24, 2013

HPUX : HOW TO RECOVER FILE FROM IGNITE IMAGE

To recover a file from ignite /etc/passwd

Issue :

/etc/passwd has been deleted

If needed, you can recover the system from it's image file:
On ignite server:
# cd /var/opt/ignite/recovery/archives/mymachine
   # ls
   2010-12-12,15:02  -- Name of the archive we extract from.


   # gzcat ./2010-12-12,15:02 | pax -r -f - etc/passwd




Recovering hosts file :

[root@mickey:/Unix_Ignite_Image8/archives/itmpbus1]#
#-> cp -p /etc/hosts /etc/hosts.backup
[root@mickey:/Unix_Ignite_Image8/archives/Donald]#
#-> gzcat 2014-05-01,08:01| pax -r -f - etc/hosts
[root@mickey:/Unix_Ignite_Image8/archives/Donald]#
#-> ll
total 10720728
-rw------- 1 65534 65534 5467472874 May 1 08:39 2014-05-01,08:01
drwxr-xr-x 2 65534 65534 4096 May 7 14:48 etc
[root@mickey:/Unix_Ignite_Image8/archives/Donald]#
#-> cd etc
[root@mickey:/Unix_Ignite_Image8/archives/Donald/etc]#
#-> ll
total 8
-rw-r--r-- 1 65534 65534 446 Apr 25 10:56 hosts
[root@mickey:/Unix_Ignite_Image8/archives/Donald/etc]#
#-> cat hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost
XX.xXX.XX.XX Donald.tnx.com Donald
[root@mickey:/Unix_Ignite_Image8/archives/Donald/etc]#
#-> uptime
2:52pm up 159 days, 10:38, 1 user, load average: 0.41, 0.35, 0.25
[root@mickey:/Unix_Ignite_Image8/archives/Donald/etc]#
 

No comments:

Post a Comment