Twiddling with tar – Differential backups on Linux

When I first mentioned the title of this post to my girlfriend, she misheard and thought there was an extra “t” at the end.
One hasty explanation later I have avoided banishment to the shed. All of which is mildly ironic as the tar command comes with a whole alphabet of options, many of which are about to get used here.

As it’s name suggests, the venerable tar command ( Tape ARchive) has it’s roots back in the time when computers were the size of a small semi in Dagenham and punch cards and tapes were the acme of the Programmer’s art.

Now I’m going to use it for backing up data on my assorted Ubuntu machines.
What I want to do here is :

  • work out how much data I need to backup
  • create a full backup of all of my data
  • make sure I know what files have been backed up
  • test the restore of a file from the backup
  • make subsequent incremental backups

In the course of this odyssey, we will discover that du has a human face and that tar has a bit of a yellow streak.
There are several things that can go horribly wrong when playing around with tar, so I’m going to test everything on a small subset of files…that I have safely stored elsewhere.
Speaking of which… Continue reading