Chapter 6. The Backup Plan

In this chapter, we will cover:

  • Archiving with tar
  • Archiving with cpio
  • Compressing data with gzip
  • Archiving and compressing with zip
  • Faster archiving with pbzip2
  • Creating filesystems with compression
  • Backup snapshots with rsync
  • Version control-based backup with Git
  • Creating entire disk images using fsarchiver

Introduction

Taking snapshots and backups of data are regular tasks we come across and they are even more important when it comes to a server or large data storage systems. Shell scripting is one of the easiest ways to automate such backups, because if not automated they aren't very useful. Also, it is desirable to use various compression formats so that we don't create large backups. Encryption is another task that comes ...

Get Linux Shell Scripting Cookbook - Second 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.