BSD Unix® Toolbox: 1000+ Commands for FreeBSD®, OpenBSD, and NetBSD®
by Francois Caen, Christopher Negus
Chapter 8. Backups and Removable Media
Data backups in UNIX were traditionally done by running commands to archive and compress the files to backup, 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 by 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. BSD systems offer 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 systems. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access