IN THIS CHAPTER
Creating backup archives with tar
Compressing backups with gzip, bzip2, and lzop
Backing up over the network with SSH
Doing network backups with rsync
Making backup ISO images with mkisofs
Burning backup images to CD or DVD with cdrecord and growisofs
Data backups in Linux were traditionally done by running commands to archive and compress the files to back up, then writing that backup archive to tape. Choices for archive tools, compression techniques, and backup media have grown tremendously in recent years. Tape archiving has, for many, been replaced with techniques for backing up data over the network, to other hard disks, or to CDs, DVDs, or other low-cost removable media.
This chapter details some useful tools for backing up and restoring your critical data. The first part of the chapter details how to use basic tools such as tar, gzip, and rsync for backups.
If you are coming from a Windows background, you may be used to tools such as WinZip and PKZIP, which both archive and compress groups of files in one application. Linux offers separate tools for gathering groups of files into a single archive (such as tar) and compressing that archive for efficient storage (
gzip, bzip2, and
lzop). However, you can also do the two steps together by using additional options to the
tar command, which stands for tape archiver, dates back to early Unix systems. ...