이 콘텐츠는 선택한 언어로 제공되지 않습니다.

6.4. Backup ext2/3/4 File Systems


Procedure 6.1. Backup ext2/3/4 File Systems Example

  1. All data must be backed up before attempting any kind of restore operation. Data backups should be made on a regular basis. In addition to data, there is configuration information that should be saved, including /etc/fstab and the output of fdisk -l. Running an sosreport/sysreport will capture this information and is strongly recommended.
    # cat /etc/fstab
    LABEL=/            /               ext3    defaults        1 1
    LABEL=/boot1       /boot           ext3    defaults        1 2
    LABEL=/data        /data           ext3    defaults        0 0
    tmpfs              /dev/shm        tmpfs   defaults        0 0
    devpts             /dev/pts        devpts  gid=5,mode=620  0 0
    sysfs              /sys            sysfs   defaults        0 0
    proc               /proc           proc    defaults        0 0
    LABEL=SWAP-sda5    swap            swap    defaults        0 0
    /dev/sda6          /backup-files   ext3    defaults        0 0
    
    # fdisk -l
       Device Boot    Start      End    Blocks      Id  System
    /dev/sda1 *           1       13    104391      83  Linux
    /dev/sda2            14      1925   15358140    83  Linux
    /dev/sda3          1926      3200   10241437+   83  Linux
    /dev/sda4          3201      4864   13366080    5   Extended
    /dev/sda5          3201      3391   1534176     82  Linux swap / Solaris
    /dev/sda6          3392      4864   11831841    83  Linux
    
    In this example, we will use the /dev/sda6 partition to save backup files, and we assume that /dev/sda6 is mounted on /backup-files.
  2. If the partition being backed up is an operating system partition, bootup your system into Single User Mode. This step is not necessary for normal data partitions.
  3. Use dump to backup the contents of the partitions:

    Note

    • If the system has been running for a long time, it is advisable to run e2fsck on the partitions before backup.
    • dump should not be used on heavily loaded and mounted filesystem as it could backup corrupted version of files. This problem has been mentioned on dump.sourceforge.net.

      Important

      When backing up operating system partitions, the partition must be unmounted.
      While it is possible to back up an ordinary data partition while it is mounted, it is adviseable to unmount it where possible. The results of attempting to back up a mounted data partition can be unpredicteable.
    # dump -0uf /backup-files/sda1.dump /dev/sda1
    # dump -0uf /backup-files/sda2.dump /dev/sda2
    # dump -0uf /backup-files/sda3.dump /dev/sda3
    
    If you want to do a remote backup, you can use both ssh or configure a non-password login.

    Note

    If using standard redirection, the '-f' option must be passed separately.
    # dump -0u -f - /dev/sda1 | ssh root@remoteserver.example.com dd of=/tmp/sda1.dump
    
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.