Este contenido no está disponible en el idioma seleccionado.
6.4. Backup ext2/3/4 File Systems
Procedure 6.1. Backup ext2/3/4 File Systems Example
- 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 offdisk -l
. Running an sosreport/sysreport will capture this information and is strongly recommended.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
. - 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.
- 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
# dump -0uf /backup-files/sda1.dump /dev/sda1 # dump -0uf /backup-files/sda2.dump /dev/sda2 # dump -0uf /backup-files/sda3.dump /dev/sda3
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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
# dump -0u -f - /dev/sda1 | ssh root@remoteserver.example.com dd of=/tmp/sda1.dump
Copy to Clipboard Copied! Toggle word wrap Toggle overflow