CHAPTER 39System Snapshots

Disk snapshots are a way of taking backups of files and directories at given time intervals. By accessing the specific snapshot interval, you can go back in time and find the version of a file from its snapshot backup. The script in this chapter backs up a list of directories that is configurable within the script; the backup is either at another location on the same disk, or on a separate disk altogether.

This script takes a copy of the original source directories and backs them up as the first snapshot. Any subsequent snapshot backups use hard links for any files that have not changed, and any changed files are copied. Like a soft link, a hard link allows multiple points of access to a single file, but a soft link ...

Get Expert Shell Scripting 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.