8

Backups and Removable Media

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 originally done by running commands to archive and compress the files to back up, and 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.

Backing Up Data to Compressed Archives

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.

Creating Backup Archives with tar

The tar command, which stands for tape archiver, dates back to early UNIX ...

Get Ubuntu Linux Toolbox: 1000+ Commands for Power Users, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.