How to restore a file from jabba

(last revision: 28.01.99)

Example: Mister Bonzanigo looks for a file called smiundo.m in dir mfiles
         He lost mistakely this file two days ago (today is Wed 30.09.98)

1- Find out the user name:

  ypcat passwd | grep onzanigo
fede:3iHro5inLiHSs:3511:10:Federico Bonzanigo:/home/ifh/fede:/bin/csh

2- look where the file is

sirius:ballisti:[ballisti]:48 % ls -l /home/ifh/fede
lrwxrwxrwx  1 root   other  19 Aug 13 02:15 /home/ifh/fede -> /home/sirius31/fede/
sirius:ballisti:[ballisti]:49 %  find /home/sirius31/fede -name smiundo.m -print
/home/sirius31/fede/mfiles/smiundo.m

3- find out in which jabba-file the partition sirius31 was dumped

rlogin sirius
su - ifhbup
password :  (ask your friendly system manager, even he will say "noway")

cd ~ifhbup/bkup_data/sirius/sirius31
{sirius:[sirius31]:80}% ls
110-9809160114-Wed-98Sep16-01-14   238-9809160114-Fri-98Sep25-01-14
129-9809160114-Thu-98Sep17-01-14   247-9809160114-Sat-98Sep26-01-14
138-9809160114-Fri-98Sep18-01-14   256-9809160114-Sun-98Sep27-01-14
147-9809160114-Sat-98Sep19-01-14   265-9809160114-Mon-98Sep28-01-14
156-9809160114-Sun-98Sep20-01-14   274-9809160114-Tue-98Sep29-01-14
165-9809160114-Mon-98Sep21-01-14   bkup_day_scheme
174-9809160114-Tue-98Sep22-01-14   family_root
213-9809160114-Wed-98Sep30-01-17   previous/
229-9809160114-Thu-98Sep24-01-14

The file should be on backup last time on 28.09.98 ==>265-...
ONLY if it was modified after the last incr_backup

Thus the file is in 265-..  OR  213-.. OR 110-...

4- Find the name of the backup file on jabba:

{sirius:[sirius31]:83}% foreach a ( 110-9809160114-Wed-98Sep16-01-14 213-9809160114-Wed-98Sep30-01-17 265-9809160114-Mon-98Sep28-01-14 )
? tail -1 $a
? end
Dump_file on jabba is sirius-sirius31-9809160114-Wed-98Sep16-01-14.110
Dump_file on jabba is sirius-sirius31-9809160114-Wed-98Sep30-01-17.213
Dump_file on jabba is sirius-sirius31-9809160114-Mon-98Sep28-01-14.265



Max. 3 searches to do.

{sirius:[sirius31]:84}% ping jabba 2
jabba is alive
{sirius:[sirius31]:85}% ls  /usr/jabba/backup/ifh/
ballisti/  ifhbup/    tommaso/
{sirius:[sirius31]:81}% cd /tmp
New directory is : /tmp
{sirius:[tmp]:82}% ufsrestore if /usr/jabba/backup/ifh/ifhbup/sirius-sirius31-9809160114-Mon-98Sep28-01-14.265
NFS server jabba not responding still trying
NFS server jabba ok
ufsrestore > ls
.:
 .dump-tapenr=216-Fri-98Sep25-10-48
 .jabba-229-9808210113-Sat-98Aug29-01-13.previous
 .jabba-229-9809160114-Thu-98Sep24-01-14
 .jabba-238-9808210113-Sun-98Aug30-01-13.previous
 .jabba-238-9809160114-Fri-98Sep25-01-14
 .jabba-247-9809160114-Sat-98Sep26-01-14
 .jabba-256-9808210113-Tue-98Sep01-01-46.previous
 .jabba-256-9809160114-Sun-98Sep27-01-14
 .jabba-265-9808210113-Wed-98Sep02-01-17.previous
 .jabba-265-9809160114-Mon-98Sep28-01-14
 .part-sirius-sirius31
 .part-sirius-sirius31-sirius31
 aschwanden/
 baggi/
 edo/
 fmeier/
 ifhbib/
 ifhbup/
 ifhdip/
 lisalina/
 lothian/
 piller/
 robin/
 rossi/
 sekretariat/

ufsrestore > quit


user fede was not listed because he did not modify anything.
try level 0 dump:

{sirius:[tmp]:88}% ufsrestore if /usr/jabba/backup/ifh/ifhbup/sirius-sirius31-9809160114-Wed-98Sep16-01-14.110
NFS server jabba not responding still trying
NFS server jabba ok
ufsrestore > ls
.:
 .dump-tapenr=328-Fri-98Sep11-00-15
 .jabba-110-9808210113-Fri-98Aug21-01-13.previous
 .jabba-110-9809160114-Wed-98Sep16-01-14
 ...
 .part-sirius-sirius31
 .part-sirius-sirius31-sirius31
...
 erlebach/
 fede/
 feilner-to-be-deleted/
 fmeier/
...
 zheng/
 zosh/

ufsrestore > cd fede
ufsrestore > ls
./fede:
 .ADeskTop          .desksetdefaults   .login             .vacation.pag
 .IDeskTop          .dt/               .logout            .wastebasket/
 .OWdefaults        .dtprofile         .mailrc            mail_folders/
 .Xauthority        .envr_XW           .resource/         mfiles/
 .afpvols           .finderinfo/       .solregis/         task_one
 .alias             .fm/               .vacation.dir      www/
 .cshrc             .history           .vacation.msg

ufsrestore > cd mfiles
ufsrestore > ls
./fede/mfiles:
 a2t.m           s2z.m           smircirc.m      smiundo.m       y2s.m
 gamma2z.m       scattering/     smirotg.m       smixcirc.m      z2gamma.m
 initsc.m        smidraw.m       smirotl.m       t2a.m           z2s.m
 reademdfile.m   smiim.m         smistand.m      test.m
 s2y.m           smiinv.m        smith.toc       test_p.m

ufsrestore > add smiundo.m
ufsrestore > extract
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] n     <=====!!! answer is "n" for NO!!!
ufsrestore > quit

==> next task should change the owner of the downloaded files. If 
    you do not have the root password, let the files be readeables
    by the group. The following is the easier way:

{sirius:[tmp]:97}% su -
Password: 
Sun Microsystems Inc.	SunOS 5.5.1	Generic	May 1996
# pwd
/
# cd /tmp
# chown -R fede fede

==> mail to user, task done.

Please mail suggestions (very welcome) or requests to ballisti@ifh.ee.ethz.ch
Ballisti Ray