<ファイルシステムのバックアップ>

 ここでは既存ファイルシステムをバックアップ用ファイルシステムへバックアップする手順について説明します。

 まず、rootファイルシステムのバックアップからいってみましょう!

GTR# dump -0 -f - /|(cd /backup_root;restore -xy -f -)
  DUMP: Date of this level 0 dump: Wed Feb 28 02:40:49 2001
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/hda1 (/) to standard output
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 1313386 tape blocks.
  DUMP: Volume 1 started at: Wed Feb 28 02:40:54 2001
  DUMP: dumping (Pass III) [directories]
spcl.c_filesys = /
dirptr = (null)
dirptr = (null)
filesys = /
  DUMP: dumping (Pass IV) [regular files]
restore: ./lost+found: ファイルは存在します
  DUMP: 57.95% done, finished in 0:03
  DUMP: Volume 1 completed at: Wed Feb 28 02:50:23 2001
  DUMP: Volume 1 took 0:09:29
  DUMP: Volume 1 transfer rate: 2525 KB/s
  DUMP: DUMP: 1436827 tape blocks
  DUMP: finished in 569 seconds, throughput 2525 KBytes/sec
  DUMP: DUMP: Date of this level 0 dump: Wed Feb 28 02:40:49 2001
  DUMP: DUMP: Date this dump completed:  Wed Feb 28 02:50:23 2001
  DUMP: DUMP: Average transfer rate: 2525 KB/s
  DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] y
GTR# df -h
ファイルシステム    サイズ 使用済 使用可 使用率  マウント場所
/dev/hda1             2.0G  1.4G  575M  71% /            ← rootの使用済は1.4GB
/dev/hda5             2.7G  166M  2.4G   7% /home
/dev/hda6            1011M   37M  923M   4% /var
/dev/hdb1             3.8G  1.4G  2.2G  37% /backup_root ← こちらも使用済は1.4GB
/dev/hdb5             9.4G   20k  8.9G   1% /backup_home
/dev/hdb6             733M   20k  696M   1% /backup_var
GTR#
GTR# dump -0 -f - /home|(cd /backup_home;restore -x -f -)
  DUMP: Date of this level 0 dump: Wed Feb 28 02:54:43 2001
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/hda5 (/home) to standard output
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 166665 tape blocks.
  DUMP: Volume 1 started at: Wed Feb 28 02:54:50 2001
  DUMP: dumping (Pass III) [directories]
spcl.c_filesys = /home
dirptr = (null)
dirptr = (null)
filesys = /home
  DUMP: dumping (Pass IV) [regular files]
restore: ./lost+found: ファイルは存在します
  DUMP: Volume 1 completed at: Wed Feb 28 02:55:44 2001
  DUMP: Volume 1 took 0:00:54
  DUMP: Volume 1 transfer rate: 3178 KB/s
  DUMP: DUMP: 171612 tape blocks
  DUMP: finished in 54 seconds, throughput 3178 KBytes/sec
  DUMP: DUMP: Date of this level 0 dump: Wed Feb 28 02:54:43 2001
  DUMP: DUMP: Date this dump completed:  Wed Feb 28 02:55:44 2001
  DUMP: DUMP: Average transfer rate: 3178 KB/s
  DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] y
GTR# df -h
ファイルシステム    サイズ 使用済 使用可 使用率  マウント場所
/dev/hda1             2.0G  1.4G  575M  71% /
/dev/hda5             2.7G  166M  2.4G   7% /home        ← homeの使用済は166MB
/dev/hda6            1011M   37M  923M   4% /var
/dev/hdb1             3.8G  1.4G  2.2G  37% /backup_root
/dev/hdb5             9.4G  166M  8.7G   2% /backup_home ← こちらも使用済は166MB
/dev/hdb6             733M   20k  696M   1% /backup_var
GTR#
GTR# dump -0 -f - /var|(cd /backup_var;restore -xy -f -)
  DUMP: Date of this level 0 dump: Wed Feb 28 02:56:49 2001
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/hda6 (/var) to standard output
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 41242 tape blocks.
  DUMP: Volume 1 started at: Wed Feb 28 02:56:52 2001
  DUMP: dumping (Pass III) [directories]
spcl.c_filesys = /var
dirptr = (null)
dirptr = (null)
filesys = /var
  DUMP: dumping (Pass IV) [regular files]
restore: ./lost+found: ファイルは存在します
  DUMP: Volume 1 completed at: Wed Feb 28 02:57:05 2001
  DUMP: Volume 1 took 0:00:13
  DUMP: Volume 1 transfer rate: 2212 KB/s
  DUMP: DUMP: 28768 tape blocks
  DUMP: finished in 13 seconds, throughput 2212 KBytes/sec
  DUMP: DUMP: Date of this level 0 dump: Wed Feb 28 02:56:49 2001
  DUMP: DUMP: Date this dump completed:  Wed Feb 28 02:57:05 2001
  DUMP: DUMP: Average transfer rate: 2212 KB/s
  DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] y
GTR# df -h
ファイルシステム    サイズ 使用済 使用可 使用率  マウント場所
/dev/hda1             2.0G  1.4G  575M  71% /
/dev/hda5             2.7G  166M  2.4G   7% /home
/dev/hda6            1011M   37M  923M   4% /var         ← varの使用済は37MB
/dev/hdb1             3.8G  1.4G  2.2G  37% /backup_root
/dev/hdb5             9.4G  166M  8.7G   2% /backup_home
/dev/hdb6             733M   37M  660M   6% /backup_var  ← こちらも使用済は37MB
GTR#