Simple, quick, short-term, "just in case" backups

We'll start with a simple type of short term backup.

Here's a typical use-case: you're starting to make some serious changes to a critical file (maybe a presentation, maybe some system configuration file like sendmail.mc, or whatever). Before you start, you do what almost everyone does: make a backup called sendmail.mc.orig or sendmail.mc.bkp.

This is simply due to the human fear of messing up something so bad you want the ability to start over again from a clean slate.

We all do it. And pretty soon our directories are cluttered with all these horrible files!

What's unique about these "backups" is that they're usually not needed after the changes are successfully done -- they're only for emergencies. As a result, even CVS or RCS is too much clutter and cleanup.

In fact, I hesitate to even call it backup -- it's really more in the realm of version control.

How is it used?

We use plain old tar!

Everyone knows the basics of tar (cvf to create a tar file, tvf to list the contents of a tar file, xvf to extract it, z or j options for compression, etc.)

But tar has another mode, called "update" mode, which appends to the archive all the files listed on the command line as long as the archive does not already have the latest version. If no files listed have changed, nothing happens.

And yes -- this means that a tar archive can save multiple revisions of the same exact file!

When is it useful?

Please remember this is not a long term backup solution! As such, it is only useful when

Don't forget: the real reason you do this is to avoid cluttering up your directories with all sorts of ".bak" or ".orig" files when you feel you don't need to use a proper version control system.

What are the downsides?

What next?

Well, the next chapter: Creating a mirror, local or remote, efficiently