Using dump to backup Linux /boot partition
Boot partition is important to load kernel so it is a good practice to back it up. I will introduce a free tool to backup a linux /boot partition called dump. The partition mounted on /boot/ contains the operating system kernel (which allows your system to boot Red Hat Enterprise Linux), along with files used during the bootstrap process. For most users, a 500 MB boot partition is sufficient.
First I will list all of the partitions on a current Centos VPS box:
We have 3 partitions. Boot partition is going to be backup-ed and destionation is the 3rd partition. The destination can be a tape drive , or a USB drive or maybe the best solution is the NFS client storage device.
The dump command is not installed by default onto the Centos distro. One can do it with very simple syntax:
yum install dump
To see the CLI options you can simply type DUMP into the BASH shell on your centos box.
I will provide some basic parametar description to clarify the switches:
– level Specifies the dump level, where n is a number between 0 and 9. For example, –0 would perform a full backup
–f filename Specifies a location ( filename) for the resulting dump file. You can make the dump file a normal file that resides on another file system, or you can write the dump file to the tape device
–z or –j Compresses each data block. The –z parameter uses zlib compression
Having that in mind we should start the compressed dump backup to a mounted drive /media/test with a filed called TEST.HDA.
To verify that the file exists and that the compression worked fine, we can see that the file size iz minimal. This is great info if the backup is needed to be copied on a FTP location using RSYNC.
There we have it. In a couple of seconds, a fully backuped /boot partition in case Disaster Recovery scenario. Hope that never happens.
Feel free to comment.
No comments:
Post a Comment