Tag Archives: linux backup
Home » Tag: linux backup


리눅스 백업 관련 명령어
tar
– 로컬영역을 백업한다.
– tar cvfpz [백업파일] [대상파일]예)# tar cvfpz home.tar.gz /home – /home 디렉토리를 home.tar.gz로 압축하여 백업한다.dump
– dump [option] [backup_name] [dump_file]
option
– 0~9 : 덤프레벨 0은 전체백업이고 나머지는 부분백업이다.
– f : 백업할 미디어 및 파일명 지정
예)
# dump -0f home_backup /home – /home디렉토리를 home_backup이란 이름으로 dump한다.
# dump -0f usr_backup /dev/sda5 – /dev/sda5 파티션을 usr_backup이란 이름으로 dump한다.
restore
– dump된 파일을 복구한다.
– restore [option] [dump_file]
option
-i : 대화식으로 복구 파일을 선택 후 복원
-f : 백업 파일명으로 지정
-r : 전체 복원
———————————————————————————————
예) dump 명령어를 이용해 /home 폴더를 백업해 보자.
# mkdir backup – 백업할 폴더를 생성한다.
# cd backup
# dump -0f home-backup /home – /home폴더를 home-backup 이름으로 dump한다.
DUMP: Date of this level 0 dump: Mon Nov 17 16:16:36 2008
DUMP: Dumping /dev/sda6 (/home) to home-backup
DUMP: Label: /home
DUMP: Writing 10 Kilobyte records
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 1890 blocks.
DUMP: Volume 1 started with block 1 at: Mon Nov 17 16:16:41 2008
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: […]