Time Machine for Linux – Bash and Rsync

Recently i made “the switch”! Not in the way you might imagine though. Ever since 2003 i have been a passionate mac user. I still use macs at home and work and am still passionate about them.

Before 2003 i was playing a lot of games. Linux was and is something that i have been working/playing around with since 1996. To make a long story short: I wanted to use Linux and also play games (read dual boot linux/windows). The price tags on new macs ware also something that got me thinking about building a new shiny i7 based PC.

I am now back on a PC with Ubuntu Linux 9.04 and Windows 7. So far so god. One thing that i enjoy with Linux is that i am able to customize it to my needs. With Linux now being my primary OS (by choice) i had to fix some kind of backup for photos and all that other stuff on my PC that i would not like to loose in case of an accident. The first thing that came to my mind was rsync.

I used rsync to mirror my files on to an usb-disk. But after a few days i started to miss Time Machine which i was using when i had a Mac as my primary computer at home. Just mirroring files was not enough to give me that warm and cozy feeling. I needed to go back in time!

As a Linux user you can choose between a vast amount of backup solutions. But hey, where is the fun in that?! So i decided to make my own backup proggie. Just for fun and at the same time i also had a learning experience (i like Linux, can you tell?).

The backup script i wrote takes incremental backups with links to different directories, just like Time Machine does. You can delete old backup directories as you please. Restore files by copying them and so on.

If you are interested in a simple, yet useful backup solution for Linux feel free to use the code below.

3 Replies to “Time Machine for Linux – Bash and Rsync”

Leave a Reply

Your email address will not be published.