본문 바로가기
▒ 과거 기억 저장소 ▒/Solaris10 UNIX

(8-1) solaris10 UNIX - 풀백업, 증분백업 한것들 복구방법.(실습예제) ufsrestore

by infosec 2016. 11. 25.
반응형

- <실습> 비대화식 복구

------------------------------------------------------------------------------------

// (s10) <root> [/]:# ls /backup

home0.dump   home2.dump   home3.dump   home4.dump   lost+found/


위 상태로 백업되어있고,


/export/home/* 다삭제했을때 복구방법. ( 순서는 풀백업 -> 증분백업 순. )

------------------------------------------------------------------------------------


// 풀백업 해놓은거 확인

// -tf : 이 옵션은 단순히 백업된거 확인만 할때 사용.

(s10) <root> [/export/home]:# ufsrestore -tf /backup/home0.dump

...


// 풀백업돼 있는거 복구 시작. ( home0.dump <- 풀백업 파일 )

// -r : 전체 풀겠다.

(s10) <root> [/export/home]:# ufsrestore -rvf /backup/home0.dump

볼륨을 확인하고 맵을 초기화합니다

매체 블록 크기는 126입니다

덤프   날짜: 2016년 10월 26일 수요일 오후 12시 16분 45초

덤프 대상: epoch

s10에서 /export/home의 레벨 0 덤프:s10

레이블: none

레벨 0 복원 시작

기호 테이블 초기화.

테이프에서 디렉토리 추출

추출 목록 계산.

노드 ./lost+found을(를) 만듭니다

노드 ./user1을(를) 만듭니다

노드 ./user2을(를) 만듭니다

노드 ./user3을(를) 만듭니다

노드 ./user4을(를) 만듭니다

노드 ./user5을(를) 만듭니다

노드 ./user6을(를) 만듭니다

노드 ./user7을(를) 만듭니다

노드 ./user8을(를) 만듭니다

노드 ./user9을(를) 만듭니다

노드 ./user10을(를) 만듭니다

노드 ./xuser1을(를) 만듭니다

노드 ./xuser2을(를) 만듭니다

새로운 최하위를 추출합니다.

복원 확인

파일 ./user1/.profile 추출

파일 ./user1/local.cshrc 추출

파일 ./user1/local.login 추출

파일 ./user1/local.profile 추출

파일 ./user2/.profile 추출

파일 ./user2/local.cshrc 추출

파일 ./user2/local.login 추출

파일 ./user2/local.profile 추출

파일 ./user3/.profile 추출

파일 ./user3/local.cshrc 추출

파일 ./user3/local.login 추출

파일 ./user3/local.profile 추출

파일 ./user4/.profile 추출

파일 ./user4/local.cshrc 추출

파일 ./user4/local.login 추출

파일 ./user4/local.profile 추출

파일 ./user5/.profile 추출

파일 ./user5/local.cshrc 추출

파일 ./user5/local.login 추출

파일 ./user5/local.profile 추출

파일 ./user6/.profile 추출

파일 ./user6/local.cshrc 추출

파일 ./user6/local.login 추출

파일 ./user6/local.profile 추출

파일 ./user7/.profile 추출

파일 ./user7/local.cshrc 추출

파일 ./user7/local.login 추출

파일 ./user7/local.profile 추출

파일 ./user8/.profile 추출

파일 ./user8/local.cshrc 추출

파일 ./user8/local.login 추출

파일 ./user8/local.profile 추출

파일 ./user9/.profile 추출

파일 ./user9/local.cshrc 추출

파일 ./user9/local.login 추출

파일 ./user9/local.profile 추출

파일 ./user10/.profile 추출

파일 ./user10/local.cshrc 추출

파일 ./user10/local.login 추출

파일 ./user10/local.profile 추출

파일 ./user1/.sh_history 추출

파일 ./user1/.kshrc 추출

파일 ./user2/.sh_history 추출

파일 ./xuser1/.profile 추출

파일 ./xuser1/local.cshrc 추출

파일 ./xuser1/local.login 추출

파일 ./xuser1/local.profile 추출

파일 ./xuser1/.kshrc 추출

파일 ./xuser2/.profile 추출

파일 ./xuser2/local.cshrc 추출

파일 ./xuser2/local.login 추출

파일 ./xuser2/local.profile 추출

파일 ./xuser2/.kshrc 추출

링크 추가

디렉토리 모드, 소유자 및 시간을 설정하십시오.

기호 테이블 확인.

복원 확인


// 확인

(s10) <root> [/export/home]:# ls

lost+found/       user2/            user6/            xuser1/

restoresymtable   user3/            user7/            xuser2/

user1/            user4/            user8/

user10/           user5/            user9/



// 풀백업 복구했으니 증분백업 해놨던거 복구

(s10) <root> [/export/home]:# ufsrestore -rvf /backup/home2.dump // -r : 전체 풀겠다.

볼륨을 확인하고 맵을 초기화합니다

매체 블록 크기는 126입니다

덤프   날짜: 2016년 10월 26일 수요일 오후 12시 21분 26초

덤프 대상: 2016년 10월 26일 수요일 오후 12시 16분 45초

s10에서 /export/home의 레벨 2 덤프:s10

레이블: none

증분 복원 시작

기호 테이블 초기화.

테이프에서 디렉토리 추출

제거할 항목을 표시하십시오.

노드 갱신 계산.

노드 ./xuser3을(를) 만듭니다

노드 ./xuser4을(를) 만듭니다

노드 ./xuser5을(를) 만듭니다

참조되지 않은 이름을 찾습니다.

오래된 노드(디렉토리)를 제거합니다.

새로운 최하위를 추출합니다.

복원 확인

파일 ./xuser3/.profile 추출

파일 ./xuser3/local.cshrc 추출

파일 ./xuser3/local.login 추출

파일 ./xuser3/local.profile 추출

파일 ./xuser3/.kshrc 추출

파일 ./xuser4/.profile 추출

파일 ./xuser4/local.cshrc 추출

파일 ./xuser4/local.login 추출

파일 ./xuser4/local.profile 추출

파일 ./xuser4/.kshrc 추출

파일 ./xuser5/.profile 추출

파일 ./xuser5/local.cshrc 추출

파일 ./xuser5/local.login 추출

파일 ./xuser5/local.profile 추출

파일 ./xuser5/.kshrc 추출

링크 추가

디렉토리 모드, 소유자 및 시간을 설정하십시오.

기호 테이블 확인.

복원 확인


// 확인

(s10) <root> [/export/home]:# ls

lost+found/       user3/            user8/            xuser4/

restoresymtable   user4/            user9/            xuser5/

user1/            user5/            xuser1/

user10/           user6/            xuser2/

user2/            user7/            xuser3/






- <실습> 필요한 것만 복구하는 방법1 ( -if 옵션 )


(s10) <root> [/backup]:# ufsrestore -if /backup/home0.dump

ufsrestore > ls

.:

lost+found/   user2/        user5/        user8/        xuser2/

user1/        user3/        user6/        user9/

user10/       user4/        user7/        xuser1/



(s10) <root> [/export/home/user1]:# cd /backup

(s10) <root> [/backup]:# ls

home0.dump   home2.dump   home3.dump   home4.dump   lost+found/

(s10) <root> [/backup]:# cd /export/home/user1

(s10) <root> [/export/home/user1]:# rm .kshrc

rm: .kshrc(y/n)을(를) 제거합니까? y

(s10) <root> [/export/home/user1]:# rm .profile

rm: .profile(y/n)을(를) 제거합니까? y



(s10) <root> [/backup]:# ufsrestore -if /backup/home0.dump

ufsrestore > ls

.:

lost+found/   user2/        user5/        user8/        xuser2/

user1/        user3/        user6/        user9/

user10/       user4/        user7/        xuser1/

ufsrestore > cd user1

ufsrestore > ls

./user1:

.kshrc          .sh_history     local.login

.profile        local.cshrc     local.profile

ufsrestore > add .kshrc .profile

ufsrestore > ls

./user1:

*.kshrc          .sh_history     local.login

*.profile        local.cshrc     local.profile

ufsrestore > marked

./user1:

*.kshrc    *.profile

ufsrestore > extract

볼륨을 아직 읽지 않았습니다.

파일이 어느 볼륨에 있는지 모를 경우 마지막 볼륨에서

시작하여 첫 번째 볼륨 방향으로 작업해야 합니다.

다음 볼륨 #를 지정: 1

소유자/모드 설정 '.'? [yn] n

ufsrestore > quit


// user1/ 생김

(s10) <root> [/backup]:# ls

home0.dump   home2.dump   home3.dump   home4.dump   lost+found/  user1/


// 복구된거 원래위치로 옮긴다.

(s10) <root> [/backup]:# cp -p user1/.kshrc /export/home/user1/

(s10) <root> [/backup]:# cp -p user1/.profile /export/home/user1/


// 복구 완료

(s10) <root> [/backup]:# ls -al /export/home/user1/

총 16

drwxr-xr-x   2 user1    other        512 10월 26일  12:58 ./

drwxr-xr-x  18 root     root         512 10월 26일  12:21 ../

-rw-r--r--   1 user1    other         96 10월 26일  11:46 .kshrc

-rw-r--r--   1 user1    other        136 10월 26일  10:47 local.cshrc

-rw-r--r--   1 user1    other        157 10월 26일  10:47 local.login

-rw-r--r--   1 user1    other        174 10월 26일  10:47 local.profile

-rw-r--r--   1 user1    other        107 10월 26일  11:48 .profile

-rw-------   1 user1    other        160 10월 26일  11:57 .sh_history






- <실습> 필요한 것만 복구하는 방법2 ( -xf 옵션 ) ( 복구할 파일을 확실히 알 때 유용하다. )


(s10) <root> [/backup]:# ufsrestore -xf home0.dump ./user1/*

경고: ./user1: 파일이 존재함

볼륨을 아직 읽지 않았습니다.

파일이 어느 볼륨에 있는지 모를 경우 마지막 볼륨에서

시작하여 첫 번째 볼륨 방향으로 작업해야 합니다.

다음 볼륨 #를 지정: 1

소유자/모드 설정 '.'? [yn] n

디렉토리가 이미 있습니다, 그래도 모드를 설정하십시오? [yn] y

(s10) <root> [/backup]:# ls

home0.dump   home2.dump   home3.dump   home4.dump   lost+found/  user1/


(s10) <root> [/backup]:# ls -al user1/

총 14

drwxr-xr-x   2 user1    other        512 10월 26일  11:45 ./

drwxr-xr-x   4 root     root         512 10월 26일  12:57 ../

-rw-r--r--   1 user1    other         96 10월 26일  11:46 .kshrc

-rw-r--r--   1 user1    other        136 10월 26일  10:47 local.cshrc

-rw-r--r--   1 user1    other        157 10월 26일  10:47 local.login

-rw-r--r--   1 user1    other        174 10월 26일  10:47 local.profile

-rw-r--r--   1 user1    other        107 10월 26일  11:48 .profile



반응형

댓글