Training Wk 19

Today the training will consist just of a walk. I have gotten a major cold that I have been incubating a few days but this morning I was really under the ice. Therefore no more cardio training this week but the weather is so good that I want to make a walk around my favourite track tonight.

Two good runs on monday and wednesday this week however, another 6k run on Monday and intervals for 4km on wednesday finished by steep hillclimbing that really got the pulse up.

Now, I will give this cold tomorrow to get in shape and then I want to start training on monday again.

Oh, and I got a new pulse training book today with lots of examples of different types to run to, intervals, hill running, distance jogging, and many other things, I’ll get back to you with a review when I know more!

Missen have passed on

Yesterday we had to put down our oldest cat, Missen.

It was a great sadness to us and we miss her a lot. It was discovered at the vet that she had an internal hernia that was causing her respiratory distress and although possible to correct with surgery, Missen being 12 years old, our feeling was that the surgery was too complex to put her through at her advanced age.

Instead she could go to sleep in my arms.

Missen

The Furry Mayhem

Missen

Missen being catty

Podrunning 60 minutes

Here is my 60 minutes podrunning Spotify link. This version includes also a warmup phase 6:03 and a cooldown phase that is 4:36 with softer music.

Running Wild

This is the list I currently keep in my android phone for a good outdoor run. The songs are a strange mix between soft and hard with a lot of love for Electronic Body Music of course.

(Yes the photo above was taken by me.)

  1. Warmup – So Klingt Liebe – And One – 6:03
  2. Running – Lucifer – Blutengel – 5:38
  3. Running – I Feel Love – The Blue Man Group – 5:13
  4. Running – On Fire – T-Connection – 7:26
  5. Running – Mambo Witch – A Split Second – 7:48
  6. Running – Headhunter (Live) – Front 242 – 4:40
  7. Running – Above – Blue Man Group – 2:46
  8. Running – Ruder Than You – Liberator – 2:45
  9. Running – Dammit – Blink 182 – 2:45
  10. Running – Sent to Destroy – Combichrist – 6:23
  11. Running – Radioactivität – Kraftwerk – 7:23
  12. Running – Sultans Of Swing – Dire Straits – 5:36
  13. Running – Cherry Blossom – Nitzer Ebb – 5:>30
  14. Running – Det Vete Fan – Movits – 2:57
  15. Cooldown – Do you want the truth or something beautiful? – Paloma Faith – 4:36

All in one glorious running package!

Using tar for backing up your data

Tar (tape archiver) is an old Unix-command that has been largely forgotten among people who are not in touch with the unix world daily today. In several forums I hear people asking how to back up files in Linux in a simple and efficient way and what to use. Most seem to prefer a graphical solution but some are happy with a command line version as well.

Personally I generally distrust graphical backup softwares. It puts a layer between you and what is actually going on that is unnecessary and those that are not just graphical shells on top of programs such as tar are usually proprietary and you can’t rely on that there is something that can read the archives in even five years time.

Tar is a little different, it has been proven over time to be one of the most efficient and well functioning backup solutions. However, people today have generally forgot how to perform full archiving, incremental backups and differential backups using tar properly.

And, as always any backup solution that fails at restoring your data now or in the future is doomed from the start. Tar builds on a format that many archive handlers can read not to mention the source code is open source and freely distributable and not likely to disappear any time soon.

Types of backups

There are generally three type of backups that we will be discussing here.

Full archive

The first and by far simplest one is a full archive. This means that everything is archived. This is generally a very time consuming and space consuming task and not something you would want to do every day. The full archive is however the simplest to restore and does not need any special considerations except that you might have to split it over several volumes depending on your media, be that tapes, CD-R/DVD-R or hard disk volumes.

Personally I prefer hard disk volumes as my backup media. A full archive for me is somewhere clodse to 700 GB so using CD-R is not really feasible (945 volumes ca) and DVD-R is not that much better (170 volumes). Tapes are probably scarce today and their capacity is usually even lower than the optical medias so harddisks is what I use. I get a Western Digital MyBook storage disk (USB2 connection) and just disconnects it between backups. This way data should not be eraseable unless you physically plug it in.

Incremental backups

Then we have incremental backups. Incrementals work like this. First you dump a full archive with everything in it. Then periodically you back up everythin that has changed since the last time. This is a very efficient backup method if you want to make backups often to minimize data loss if there is an accident. The downside of it is that you will quickly come to have lots of files to keep track of and even more important, a restore operations means that you must restore all the files in the order they were created. This is very time consuming and more risky that something goes wrong.

However, incremental backups are incredibly popular also, they are usually fast. The more often you backup the faster the backup goes, at least in theory.

Differential backups

Then the last type we will be talking about are differential backup. They start out just like incrementals with a full archive copy of everything. Then everytime you backup you backup everything that has changed since the full archive was made. The difference here to incrementals is that you only have two active files at any time, the last full archive and the differential archive. A restore operation is therefore very efficient and a two-step operation only.

The downside with differentials is that over time the diff file will grow since more and more files have changed from the time of the last full archive, and therefore the efficiency over time is not great. When the differential has grown to the size of something like 50% of the full archive then it may be better to make a new full archive and start over with the differential.

Using tar

Using tar to perform a full backup is done like this:

tar -c -v -f archive.tar /home/

Using tar in windows under the Cygwin package you would have to change the /home/ path to /cygdrive/c/Documents\ and\ Settings/ or something similar because that is where your personal data will be located on the computer (unless your ”My Documents” has been moved to a different location for some reason.

Using tar to perform incremental backups requiers a two-step process. First you creat a full archive but with a separate date stamp file:

tar -g incremental.snar -c -v -f archive.0.tar /home/

The -g option is the same as –listed-incremental=incremental.snar option and allows the tar to store additional metadata outside the archive that can be used to perform increments later.

tar can also do without the external file, but since this put non-standard meta-data into the tar archive itself it is not recommended since it might break compatibility with non-gnu tools.

The next level or the first increment is thus performed such as:

tar -g incremental.snar -c -v -f archive.1.tar /home/

Since the incremental.snar file already exists only files newer than files referred in the meta-data file will be dumped. The meta-data file incremental.snar will be updated and you will have your first increment.

Keep going like this for each increment. When you want to perform a full restore again use a new incremental.snar file or delete the old one. The meta-data file is not necessary in order to restore the file system.

Restore is done with

tar -g /dev/null -x -v -f archive.0.tar 

Repeat this for each increment you have done, i.e. archive.1.tar, archive.2.tar and so on. Remember that when using tar incrementally it will try to recreate the exact file system, i.e. it will delete files that did not exist when the archive was dumped. Therefore you will see the file system change until you have the last increment in place and it will be fully restored.

Differential files are simplest done by dumping files that have changed on or after the date of the full archive. In order to do this, create the full archive first. Then note the time stamp of the archive (I put it in the file name of the archive) thus:

tar -cvf full-archive-2010-05-01.tar /home/

Then to create a differential for all files that changed since the 1st of may 2010 you can perform the following:

tar -N 2010-05-01 -cvf diff-archive-2010-05-05.tar

The new archive will contain all the files that has changed on the date or later dates that you give to the -N option.

The next differential is created in the same way but at a later date. After that you may remove the old differential since it will be superseeded by the new one.

To restore simply untar the full-archive and then the latest differential. When those two operations have finished your file system is up to date again.

This version of the command will however NOT delete any files from the file system as the incremental version will do.

tar -xvf full-archive-2010-05-01.tar
tar -xvf diff-archive-2010-05-05.tar

That’s it for this time. Have fun with tar.