so - first thing I did was invoke the recover command, specifying the networker server (cluster) and client;
eudt0201:root /tmp/cronoratab > /opt/networker/bin/recover -s ukprbknws001 -c eudt0201-bk
/tmp/cronoratab/ not in index
and then entered the directory I needed to recover the file from;
Enter directory to browse: /var/spool/cron/crontabs/
recover: Current working directory is /var/spool/cron/crontabs/
help is our friend!
recover> help
Available commands are:
add [-q] [filename] - add `filename' to list of files to be recovered
cd [dir] - change directory to dir
changetime [date] - change the time that you are browsing
debug
delete [filename] - delete `filename' from the recover list
destination - print destination location for recovered files
dir [/w] [filename...] - list filename
exit - immediately exit program
force - overwrite existing files
help or `?' - print this list
lf [-aAcCdfFgilLqrRsStu1] [filename...] - list filename type
list [-c | -l] - list the files marked for recover
ll [-aAcCdfFgilLqrRsStu1] [filename...] - long list filename
ls [-aAcCdfFgilLqrRsStu1] [filename...] - list filename
noforce - do not overwrite existing files
pwd - print current directory
quit - immediately exit program
recover - recover requested files
relocate [dir] - specify new location for recovered files
verbose - toggle verbose mode; feedback about what is going on
versions [filename] - report on each version of file `filename
volumes [filename] - report volumes needed to recover marked files
`filename' can be either a file or a directory
I used 'destination' to check where the file was going to be recovered to;
recover> destination
recover files into their original location
and then changed the destination using relocate;
recover> relocate
New destination directory: /tmp/cronoratab
and confirmed that with the destination command;
recover> destination
recover files into /tmp/cronoratab
listed the files in the direcotry I want to restore from
recover> ls
adm oracle root sys
recover> ls -lrt
total 32
-r-------- root 61 Jun 07 2007 sys
-r-------- root 771 Apr 30 2008 adm
-r-------- root 1157 Jul 04 2008 root
-r-------- root 1 May 21 09:27 oracle
and then added the file I want to recover with the add command
recover> add oracle
1 file(s) marked for recovery
and then recovered it with the recover command
recover> recover
recover: Total estimated disk space needed for recover is 8 KB.
Recovering 1 file from /var/spool/cron/crontabs/ into /tmp/cronoratab
Volumes needed (all on-line):
AD0085 at ACSLS01_D
Requesting 1 file(s), this may take a while...
./oracle
Received 1 file(s) from NSR server `ukprbknws001'
Recover completion time: Wed Jun 10 11:00:28 2009
recover> quit
eudt0201:root /tmp/cronoratab > ls
oracle
and then there is this other example where I needed an earlier file;
recover> ls -lrt
total 32
-r-------- root 61 Jun 07 2007 sys
-r-------- root 771 Apr 30 2008 adm
-r-------- root 1157 Jul 04 2008 root
-r-------- root 1 May 21 09:27 oracle
by using the changetime command and specifying a date in May
recover> changetime May 19
time changed to Tue May 19 23:59:59 2009
recover> ls
adm oracle root sys
recover> ls -lrt
total 32
-r-------- root 61 Jun 07 2007 sys
-r-------- root 771 Apr 30 2008 adm
-r-------- root 1157 Jul 04 2008 root
-r-------- root 3377 Mar 31 07:45 oracle
recover> add oracle
1 file(s) marked for recovery
recover> destination
recover files into /tmp/cronoratab
recover> recover
recover: Total estimated disk space needed for recover is 8 KB.
Recovering 1 file from /var/spool/cron/crontabs/ into /tmp/cronoratab
Volumes needed (all on-line):
AD0630 at ACSLS01_D
Requesting 1 file(s), this may take a while...
./oracle
./oracle file exists, overwrite (n, y, N, Y) or rename (r, R) [n]? y
overwriting ./oracle
Received 1 file(s) from NSR server `ukprbknws001'
Recover completion time: Wed Jun 10 11:17:46 2009
recover> quit
Hope this helps!
Darren
No comments:
Post a Comment