Friday, January 02, 2009

Better Time Machine

I was very upset by an Apple Time Machine. Looks like Apple has no idea how to be loser-friendly. Suppose, you have a Mac and all your data Time Machine put in your external USB hard drive. Now your Mac is very dead. What you suppose to do with your hard drive?.. Your friend with Windows will not be able to read the drive. Your another friend with OpenSolaris installed with shrug and ask "You want me format this thing?". Well, yes, you can mount HFS+ in Linux if support of this file system is in certain distribution or if you install MacDrive third-party software on Windows. After that you will find something very same what rsnapshot does for years to everyone over the world. That's great, but still: how to backup my Linux desktop? How about those, who on Windows? — see, rsync is not very good idea and is not meant to work on Windows, although there is cwRsync thing.

The whole idea of backups is to restore your data AS SOON AS POSSIBLE WITH ANY DEVICE YOU HAVE. It might be Nokia Tablet or that useless Asus Eee PC with custom Linux or very limited Windows XP inside, it might be an OpenSolaris laptop (hell, why not?) etc.

So when I wanted to setup some backup solution for my heterogeneous desktops at my home to make same backups to one standard place, I did not find anything good on freshmeat.net and sourceforge.net as well. These things are usually too complicated and over-engineered or they're just closed source freeware with free licence. To buy a proprietary software by a geek with more than 10 computers at home?.. WTF?..

Shortly, it took for me 5 hours to write a core for my own thing, like Apple Time Machine, from very scratch. It supports any sort of Network Attached Storages without any nasty hacks (iTimeMachine comes in mind) as well as support flash memory cards, USB drives etc. It supports anything anywhere, because it is, simply saying, stores files into a folder you choose. Simply mount your writable share (or "map to a drive" in windozers language) and point software to it.

Backups are just regular ZIP files. Every more-less useful OS has unzip thing, even already dead BeOS or not-yet-born Haiku OS. So as long as you've mounted your drive or flash card to any device (let's say it is FAT32, readable by mostly everything on this planet), you're completely safe to read it by something else at any time with standard tools.

To save your space in storage, it makes incremental backups, of course. First time it makes full backup, storing everything to ZIP file. Compression is optional, but preferred to save your disk space, since smallest ZIP file with few bytes file inside takes nearly 4Kb. However, you may turn compression off, in the case if your machine does not really likes CPU load and you want just to store your files in one file, like a Tar. Again, on my MacBook 2.16GHz Intel Core 2 Duo it performs very nice with full compression and saves lots of space (unlike Apple Time Machine). Next backups contains only new or changed files. To restore all your environment, once your Mac died and you have none of pimp GUI, just simply unzip base ZIP file, then take latest update ZIP file and unzip on top of it, overwriting previous files from base ZIP. You're done!

I am going to put GUI on top of it and make it more fancy and easy to use for users. Basically, it will ask you what to backup where and that's pretty it. Everything else it will decide by itself automatically. To restore files, users will see something very similar to Mac OS X Finder and simply point to the missing file. I do not have finished concept of the GUI for file restore, but I want to do it very intuitive and simple.

Since all stuff is written in Java, it is already working on Linux, Windows and OpenSolaris as well. So for those, who needs personal backup system on other desktop — this stuff might be useful. I am going to keep it very tiny, throwing all the bloatware, that is very typical for Java programs. Will see what we will get finally... :-)

Ugghh... Apple... :-(

No comments: