로그인
Sign in
1. mt 명령어


blue# mt -f /dev/rmt/0 status   -> backup device의 상태를 표시  

HP JetStore 6000 C1533 tape drive:

  sense key(0x6)= Unit Attention   residual= 0   retries= 0

  file no= 0   block no= 0

blue# mt -f /dev/rmt/0 status

HP JetStore 6000 C1533 tape drive:

  sense key(0x13)= EOT   residual= 0   retries= 0

  file no= 1   block no= 0

blue# mt -f /dev/rmt/0n status

HP JetStore 6000 C1533 tape drive:

  sense key(0x0)= No Additional Sense   residual= 0   retries= 0

  file no= 4   block no= 0


blue# mt -f /dev/rmt/0n eom  -> tape의 맨끝으로 이동

blue# mt -f /dev/rmt/0 rewind     -> tape를 제일 처음으로 되감는다.

blue# mt -f /dev/rmt/0n fsf [count]  -> count 갯수 만큼 화일뒤로 건너 띈다.

blue# mt -f /dev/rmt/0n bsf [count]  -> count 갯수 만큼 화일 앞으로 건너 띈다.

blue# mt -f /dev/rmt/0 erase  -> tape의 모든 내용을 지운다. tape나 device에 따라다르나 시간이 많이 걸린다.

blue# mt -f /dev/rmt/0 offline  -> tape가 eject 된다.


2. tar 명령어


blue# tar tvf /dev/rmt/0     -> tape의 내용을 확인함  

-rw-r--r--   0/3      6434 1997년  7월 16일 12:47 st.conf

blue# tar xvf /dev/rmt/0   -> tape에있는 내용를 Hard disk로 내림

x st.conf, 6434 bytes, 13 테이프 블럭

blue# tar cvf /dev/rmt/0 /etc/hosts   -> Hard disk에있는 file 이나 directory를  tape로 받음

/etc/hosts는 ./inet/hosts와 기호 링크됨


blue# tar tvf /dev/rmt/0
lrwxrwxrwx   0/0        12 1998년  3월  5일 10:01 hosts ./inet/hosts로 심볼릭 링크됨
-r--r--r--   0/3       558 1998년  4월 16일 19:15 passwd
-r--------   0/3       333 1998년  4월 16일 19:15 shadow

blue# tar rvf /dev/rmt/0 group   -> replace, tarfile의 끝에 추가한다.
a group 1 테이프 블럭

blue# tar tvf /dev/rmt/0
lrwxrwxrwx   0/0        12 1998년  3월  5일 10:01 hosts ./inet/hosts로 심볼릭 링크됨
-r--r--r--   0/3       558 1998년  4월 16일 19:15 passwd
-r--------   0/3       333 1998년  4월 16일 19:15 shadow
-rw-r--r--   0/3       295 1998년  4월 16일 19:12 group

blue# tar cvfb  -  20 files | rsh host dd of=/dev/rmt/0  obs=20b -> remote host에있는 drive로 backup 받기


blue# rsh -n host dd if=/dev/rmt/0 bs=20b |tar xvBfb - 20 files -> remote host에있는 drive로 backup 내리기




3. ufsdump 명령어


3.1 한개의 화일 시스템을 받을경우

blue# ufsdump 0ucf /dev/rmt/0n /dev/rdsk/c0t0d0s0    -> full dump

DUMP: Writing 63 Kilobyte records

DUMP: Date of this level 0 dump: 1998년 4월 29일 수요일 오전 11시 03분 20초

DUMP: Date of last level 0 dump: the epoch

DUMP: Dumping /dev/rdsk/c0t0d0s0 (blue:/) to /dev/rmt/0n.

DUMP: Mapping (Pass I) [regular files]

DUMP: Mapping (Pass II) [directories]

DUMP: Estimated 1703122 blocks (831.60MB).

DUMP: Dumping (Pass III) [directories]

DUMP: Dumping (Pass IV) [regular files]

DUMP: 63.88% done, finished in 0:05

DUMP: 1703014 blocks (831.55MB) on 1 volume at 793 KB/sec

DUMP: DUMP IS DONE

3.2 ufsdump option


          0 - 9  : 덤프레벨로 "0"은 full dump를 의미하고 "1 - 9"는 점진적인 백업을 말한다. /etc/dumpdate를 기준으로 백업한다.
          u      : /etc/dumpdate에 기록한다.
          c      : Catridge, 이옵션은 1000BPI density 와 126 blocking factor로 맞춘다.
          l      : Autoload , dump가 끝나기전에 tape의 끝을 만나면 다음 테이프를 load한다.
          v      : verify
          S      : 용량을 계산한다. 실제로 백업받지는 않는다.
          
          f   dump_file   :  화일 이미지를 dump_file에 기록한다. dump_file은 /dev/rmt/0 대신에 file이 될 수있다. 만약 dump_file이 "-" 이라면 표준 출력으로 dump된다. hostname:device 표기법으로 원격시스템에 있는 장치를 사용할 수도있다. ex) ufsdump 0ucf blue:/dev/rmt/0 /dev/rdsk/c0t0d0s0
만약 root일경우 local machine의 이름이 remote machine의 /.rhosts 에 있어야한다.
         w        : /etc/dumpdate를 기준으로 가장 최근에 백업되지 않은 /etc/vfstab내의 ufs 화일 시스템을 모두 출력한다.

     blue# ufsdump 0Sf /dev/rmt/0 /dev/rdsk/c0t0d0s0
       873689088

       blue# ufsdump w
       Dump these file systems:
       /dev/rdsk/c0t0d0s0    (     /) Last dump: Level 0, Date Wed Apr 29 12:50
       /dev/rdsk/c0t0d0s7    (/export/home) Last dump: Level 0, Date Sat May  2 12:57
       /dev/rdsk/c0t1d0s0    (      ) Last dump: Level 0, Date Wed Apr 29 11:23

       blue# cat dumpdates
       /dev/rdsk/c0t0d0s0               0 Wed Apr 29 12:50:50 1998
       /dev/rdsk/c0t0d0s7               0 Sat May  2 17:20:01 1998
       /dev/rdsk/c0t1d0s0               0 Wed Apr 29 11:23:19 1998


Sample Dump Schedule

ex1)  0 once a month                  


       월      화      수     목     금     토    

       5       5       5      5      5      3                          

       5       5       5      5      5      3

       5       5       5      5      5      3

       5       5       5      5      5      3

0 <---|
   <-----------|
   <-------------------|
   <--------------------------|
   <----------------------------------|
   <-----------------------------------------|


ex2)  0 once a month


     월      화      수     목     금     토

     3       4       5      6      7      2

     3       4       5      6      7      2

     3       4       5      6      7      2

     3       4       5      6      7      2

0<---|
     <-------|
             <--------|
                      <------|
                             <------|
      <------------------------------------|

3.3 여러개의 filesystem을 하나의 테이프에 받을경우

blue# ufsdump 0ucf /dev/rmt/0n /dev/rdsk/c0t0d0s0;ufsdump 0ucf /dev/rmt/0n /dev/rdsk/c0t0d0s7


DUMP: Writing 63 Kilobyte records

DUMP: Date of this level 0 dump: 1998년 4월 29일 수요일 오전 11시 03분 20초

DUMP: Date of last level 0 dump: the epoch

DUMP: Dumping /dev/rdsk/c0t0d0s0 (blue:/) to /dev/rmt/0n.

DUMP: Mapping (Pass I) [regular files]

DUMP: Mapping (Pass II) [directories]

DUMP: Estimated 1703122 blocks (831.60MB).

DUMP: Dumping (Pass III) [directories]

DUMP: Dumping (Pass IV) [regular files]

DUMP: 63.88% done, finished in 0:05

DUMP: 1703014 blocks (831.55MB) on 1 volume at 793 KB/sec

DUMP: DUMP IS DONE

DUMP: Level 0 dump on 1998년 4월 29일 수요일 오전 11시 03분 20초

DUMP: Writing 63 Kilobyte records

DUMP: Date of this level 0 dump: 1998년 4월 29일 수요일 오전 11시 21분 18초

DUMP: Date of last level 0 dump: the epoch

DUMP: Dumping /dev/rdsk/c0t0d0s7 (blue:/export/home) to /dev/rmt/0n.

DUMP: Mapping (Pass I) [regular files]

DUMP: Mapping (Pass II) [directories]

DUMP: Estimated 303300 blocks (148.10MB).

DUMP: Dumping (Pass III) [directories]

DUMP: Dumping (Pass IV) [regular files]

DUMP: 303280 blocks (148.09MB) on 1 volume at 1269 KB/sec

DUMP: DUMP IS DONE


조회 수 :
473
추천 수 :
30 / 0
등록일 :
2003.12.13
16:44:35 (*.193.52.140)
엮인글 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2933&act=trackback&key=35e
게시글 주소 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2933
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
56 backup 명령어 정리 (2) 하록 2003-12-13 1253
» 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