원격으로 필수데이터 백업

원격으로 백업해야할 워크스테이션이나 서버상에는 프로그램, 데이터 파일,
특히 라이센스파일들이 많이 있다.

시스템 전체를 백업하는 것은 네트웍에 부하를 주게되므로 백업되어야할
최소의 필수데이터를 확인해야 한다.

예를 들자면

/var/flexlm
/usr/local/flexlm
/var/netls
/var/license
/etc/passwd
/etc/hosts
/etc/groups
/etc/netgroups
/etc/shadow
/vmunix
/kernel

등등....

==================================================================
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2328 - May 17, 2005

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BACKUP THE REMOTE ESSENTIALS

There are many programs, data files, and especially
license files that sit out on remote workstations
and servers that you may should be backing up
remotely.

If backing up the entire system puts a strain
on your network, make sure that all the  essential
files at least get backed up.

Some files may be
/var/flexlm
/usr/local/flexlm
/var/netls
/var/license
/etc/passwd
/etc/hosts
/etc/groups
/etc/netgroups
/etc/shadow
/vmunix
/kernel
etc....

반응형
Posted by She쥐포s

o fbackup으로 Data Backup
    - 단일 디렉토리 또는 파일 백업
        # fbackup -f /dev/rmt/0m -i /home -I index.home
        # fbackup -f /dev/rmt/0m -i .         -I index.pwd

    - Full/Incremental(증분) 백업 수행
        # cd /var/adm/fbackupfiles
        # vi graph
            i /
            e /tmp
            e /cdrom
        # fbackup -f /dev/rmt/0m -u0g graph -I index.full
        # fbackup -f /dev/rmt/0m -u1g graph -I index.incremental

o 기타사항
    - fbackup 옵션
        -f device
            장치명 지정
        -i path
            포함시킬 파일 또는 디렉토리 지정
        -e path
            제외시킬 파일 또는 디렉토리 지정
        -g graph
            포함/제외시킬 파일/디렉토리의 목록을 포함하는 파일 지정
        -0-9
            백업 레벨. -g 옵션과 조합했을 때만 유용함. 기본값 0
        -u
            언제 어떤 graph 파일이 사용되었는지를 기록하는 /var/adm/fbackupfiles/dates 파일을 업데이트
            -g 옵션과 조합했을 때만 유용함.
        -I path
            지정한 경로에 index 파일 생성

    - fbackup 백업 레벨
        Level 0
            fbackup의 기본 레벨. Full 백업 수행
        Level 1-9
            증분백업에 사용됨

    - fbackup Graph File
        command line에서 -i 또는 -e 옵션을 줄 수 있지만 일반적으로 "graph" 파일이라 불리는 아스키파일을
        만들어 관리한다. 이 "graph" 파일은 시스템의 어느 곳이든, 어떤 이름으로든 저장될 수 있다.(graph란
        이름이 정해져 있지 않다.)

    - fbackup 백업 레벨과 Graph 파일
        증분백업을 하기 위해서 fbackup은 어떤 graph 파일이 어떤 백업레벨로 백업되었는지 구분할 수 있어야
        한다. fbackup은 이 정보들을 /var/adm/fbackupfiles/dates라는 파일에 기록한다. dates 파일은 각각의
        graph 파일의 각 백업레벨의 가장 최근 백업에 대한 정보를 담고 있다.

        dates 파일 내용은 다음의 정보를 포함한다.
            ㅡ 백업에 사용된 graph 파일
            ㅡ 백업 레벨
            ㅡ 백업 일자
            ㅡ 백업 시작 시간과 종료 시간

    - fbackup Index 파일 생성
        -I path 옵션 사용

반응형
Posted by She쥐포s

2007. 11. 3. 21:12 Unix

디렉토리 내용 옮기기

디렉토리 내용 옮기기
(Solaris에서.. 다른 Unix도 대동소이함, 리눅스의 경우 S옵션도 있음 찾아볼 것)
 
cd origdir
tar cfb - 126k . | ( cd /newdir ; tar xfvp - )

성능을 위해서는 star가 더 좋다.
ufsdump와 restore에 대해서는 man page를 보라, 매우 비슷한 문법이다.
):
@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@
 
cd origdir
tar cfb - 126k . | ( cd /newdir ; tar xfvp - )

for performance star is better
see man pages for ufsdump+restore, very similar syntax
):
반응형
Posted by She쥐포s
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP
 
                       Unix Tip 2327 - May 16, 2006
 
                   http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
cpio로 디렉토리구조(tree) 복사하기
 
표준 Unix tar를 사용하여 디렉토리구조를 복사하게 되면 원래의 복사하는 동안
디렉토리와 파일에 대한 소유자와 그룹정보를 보존하지 않는다.
이 정보를 보존하기 위해서 다음과 같은 방법으로 find(1)와 pipe를 통해
cpio(1)를 사용하라.
 
% cd <원본 디렉토리>
% find . -depth -print | cpio -pudm <대상 디렉토리>
 
이 명령은 <원본 디렉토리>의 디렉토리 구조에 대한 미러 이미지를 <대상 디렉토리>에
생성할 것이다.
 
@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@
 
COPY A TREE WITH CPIO
 
Using standard UNIX tar to copy a
tree doesn't preserve the original
owner and group information for the
directories and files during the copy.
To do this, use find(1) piped to cpio(1)
this way:
 
% cd <source-directory>
% find . -depth -print | cpio -pudm <dest-directory>
 
This will create a mirror image of the
<source-directory> tree in <dest-directory>.
반응형
Posted by She쥐포s

Linux 에서 DAT 사용법

 

SCSI controller 를 linux 에서 인식시키는 방법.

modprobe <SCSI module 이름>

: modprobe initio

 

SCSI controller 및 연결된 장비 보는 방법.

J:~ # cat /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 05 Lun: 00

   Vendor: HP       Model: C5683A           Rev: C005
   Type:   Sequential-Access                ANSI SCSI revision: 02

 

혹은 dmesg 명령.

 

scsi0 : Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g

  Vendor: HP        Model: C5683A            Rev: C005

  Type:   Sequential-Access                  ANSI SCSI revision: 02

st: Version 20030403, bufsize 32768, max init. bufs 4, s/g segs 16

Attached scsi tape st0 at scsi0, channel 0, id 5, lun 0

st0: Block limits 1 - 16777215 bytes.

 

mt 사용법.

mt –f /dev/st0 status (첫번째 tape 장비 상태 보는 법)

mt –f /dev/st0 eject (첫번째 tape 장비안의 tape 꺼내기)

man mt 참고할 것.

 

tar 사용법.

tar cvf /dev/st0 /backup (/backup 을 tape 에 기록)

tar tvf /dev/st0 (tape 안의 내용을 봄)

tar xvf /dev/st0 (현재 folder 에 tape 내용을 복구)

man tar 참고할 것.

 

참고 문서: http://kldp.org/KoreanDoc/TapeDrive-KLDP

출처 : http://cafe.naver.com/lto/31

반응형
Posted by She쥐포s

2007. 11. 1. 17:36 Unix/HP-UX

Tape Backup 확인

# mt -f /dev/rmt/0mn rew
# mt -f /dev/rmt/0mn fsf 22     # Itanium의 경우 22, PA-RISC의 경우 1
# tar tvf /dev/rmt/0mn
 
/var/opt/ignite/recovery/latest/flist 파일 내용과 비교
반응형
Posted by She쥐포s
이전버튼 1 이전버튼

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.3
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

최근에 올라온 글

최근에 달린 댓글

글 보관함