로그인
Sign in
4. ufsrestore 명령어

4.1 Restoring Entire File System

blue# mount /dev/dsk/c0t0d0s7 /export/home

blue# cd /export/home

blue# mt -f /dev/rmt/0n fsf 1   -> 다음 point로 이동

blue# ufsrestore rvf /dev/rmt/0n

Verify volume and initialize maps

Media block size is 126

Dump   date: Sat May 02 12:57:43 1998

Dumped from: the epoch

Level 0 dump of /export/home on blue:/dev/dsk/c0t0d0s7

Label: none

Begin level 0 restore

Initialize symbol table.

Extract directories from tape

Calculate extraction list.

Warning: ./lost+found: File exists

Make node ./cyberguy

Make node ./dsw

Make node ./dsw/core

Make node ./crash

Make node ./crash/blue

Make node ./test

Extract new leaves.

Check pointing the restore

extract file ./.CPR

extract file ./dsw/core/unix.2

extract file ./dsw/core/vmcore.2

extract file ./dsw/core/threadlist.0

extract file ./dsw/core/threadlist.2

extract file ./crash/blue/vmcore.0

extract file ./crash/blue/unix.0

extract file ./crash/blue/bounds

extract file ./crash/blue/threadlist.0.org

extract file ./crash/blue/threadlist.0

Add links

Set directory mode, owner, and times.

Check the symbol table.

Check pointing the restore

blue# pwd

/export/home

blue# ls

crash            dsw              restoresymtable
cyberguy         lost+found       test

blue# rm restoresymtable

4.2   ineractive restore

  blue# cd  /var/tmp

  blue# ufsrestore ivf /dev/rmt/0

  Verify volume and initialize maps

  Media block size is 126

  Dump   date: Mon May 11 14:33:16 1998

  Dumped from: the epoch

  Level 0 dump of /user on blue:/dev/dsk/c0t1d0s3

  Label: none

  Extract directories from tape

  Initialize symbol table.

  ufsrestore > ls
  .:
      2 *./               2 *../              3  lost+found/      4  passwd

  ufsrestore > cd lost+found

  ufsrestore > cd /

  ufsrestore > add passwd lost+found

  ufsrestore > verbose

  verbose mode off

  ufsrestore > verbose

  verbose mode on

  ufsrestore> delete lost+found

  ufsrestore > ls
  .:
      2 *./               2 *../              3  lost+found/      4 *passwd

  ufsrestore > extract

  Extract requested files

  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

  extract file ./passwd

  Add links

  Set directory mode, owner, and times.

  set owner/mode for '.'? [yn] n

  ufsrestore > quit


4.3  restore files

  # ufsrestore xvf /dev/rmt/0 ./etc/passwd


4.4  display the content of the tape

# ufsrestore tvf /dev/rmt/0


5. cpio commands

blue# find . -print | cpio -ovcB > /dev/rmt/0   -> 현디렉토리의 내용을 tape로 backup 받는다.
.
upgrade
upgrade/Agree.ps
upgrade/Announcement.ps
upgrade/Program.ps
upgrade/Refund.ps
upgrade/URCFORM.ps
array
array/DECptscII
array/DECptscII/pkgmap
array/DECptscII/pkginfo
array/DECptscII/root
array/DECptscII/root/kernel
array/DECptscII/root/kernel/drv
array/DECptscII/root/kernel/drv/classes
array/DECptscII/root/kernel/drv/ptscII.52
array/DECptscII/root/kernel/drv/ptscII.53
array/DECptscII/install
array/DECptscII/install/copyright
array/DECptscII/install/postinstall
array/DECptscII/install/preremove
array/DECstgwks
array/DECstgwks/pkgmap
array/DECstgwks/pkginfo
array/DECstgwks/root
array/DECstgwks/root/$TRANSDIR
array/DECstgwks/root/$TRANSDIR/sd.conf
array/DECstgwks/root/$TRANSDIR/trans.Z
array/DECstgwks/root/$TRANSDIR/trans.conf

blue# cpio -ivcB array/DECstgwks/install/space < /dev/rmt/0  -> tape에서 space file을 extract한다.
array/DECstgwks/install/space
8550 blocks


blue# find . -mtime -7 -print | cpio -ovcB > /dev/rmt/0n  -> 최근 일주일내에 수정된 file을 tape로 받는다.
.
upgrade
upgrade/Agree.ps
upgrade/Announcement.ps
upgrade/Program.ps
upgrade/Refund.ps

blue# find . -name 'file*' -print | cpio -ovcB > file.list

blue# cpio -ivt < file.list



6. Backup script sample

  #!/bin/csh

  set verbose

  set day = `date +%y%m%d`

  mt -f /dev/rmt/0n rew

  ufsdump 0uf /dev/rmt/0bn /

  ufsdump 0uf /dev/rmt/0bn /usr

  ufsdump 0uf /dev/rmt/0bn /var

  ufsdump 0uf /dev/rmt/0bn /export/home

  ufsdump 0uf /dev/rmt/0bn /opt

  echo "now test the backups."

  mt -f /dev/rmt/0n rew;ufsrestore tfs /dev/rmt/0n 1 > /export/home/bert/dumpfile1.${day}

  mt -f /dev/rmt/0n rew;ufsrestore tfs /dev/rmt/0n 2 > /export/home/bert/dumpfile2.${day}

  mt -f /dev/rmt/0n rew;ufsrestore tfs /dev/rmt/0n 3 > /export/home/bert/dumpfile3.${day}

  mt -f /dev/rmt/0n rew;ufsrestore tfs /dev/rmt/0n 4 > /export/home/bert/dumpfile4.${day}

  mt -f /dev/rmt/0n rew;ufsrestore tfs /dev/rmt/0n 5 > /export/home/bert/dumpfile5.${day}


7. Sun O/S backup parameter

  High density Fujitsu/Xylogics 1/2" tape

   # dump 0uf /dev/rmt8 /dev/rxy0


600' QIC-24 9 track 1/4" cartridge tape

   # dump 0ucf /dev/nrst8 /dev/rds0h

QIC-150 18 track 1/4" catridge tape:

   # dump 0ucsf 1500 /dev/rst0 /dev/rsd0h

Exabyte 8mm catridge tape:

   # dump 0usf 145000 /dev/rst0 /dev/rid001h

조회 수 :
1253
추천 수 :
12 / 0
등록일 :
2003.12.13
16:44:51 (*.193.52.140)
엮인글 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2934&act=trackback&key=d12
게시글 주소 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2934
List of Articles
번호 제목 글쓴이 날짜 조회 수
71 키보드의 Power 버튼 기능 막기 하록 2003-12-13 452
70 웹서버를 위한 솔라리스 튜닝 하록 2003-12-13 718
69 FTP 자동 다운로드 하록 2003-12-13 567
68 Automount 설정하기 하록 2003-12-13 424
67 Solaris x86 install 하록 2003-12-13 483
66 Login 사용자 수를 늘리려면... 하록 2003-12-13 456
65 Solaris 7 에서 sendmail setup 방법 하록 2003-12-13 556
64 시스템 성능 측정 하록 2003-12-13 695
63 Multiple Monitor 설정 하록 2003-12-13 484
62 Volume Manager에서 rootdg 복구 (2) 하록 2003-12-13 476
61 Volume Manager에서 rootdg 복구 (1) 하록 2003-12-13 802
60 Time zone을 바꾸려면... 하록 2003-12-13 455
59 rsh를 이용해서 다른 시스템으로 디렉토리를 복사하려면.. 하록 2003-12-13 931
58 HDD 추가하는 방법 하록 2003-12-13 483
57 On-board PGX graphic resolution change 하록 2003-12-13 411
» backup 명령어 정리 (2) 하록 2003-12-13 1253
55 backup 명령어 정리 (1) 하록 2003-12-13 473
54 Disk Quotas 하록 2003-12-13 608
53 Boot Block이 손상되었을 때 하록 2003-12-13 715
52 O/S Backup & Restore 하록 2003-12-13 434