Added Jan 05 2010
, Modified Jan 05 2010 - 09:22 AM
I know it is not "fashionable" to bash windows nowadays but being someone that *has* to use it mostly against his will I have this random message primarily for myself:
The Windows philosophy is really not a flawed one, In my personal opinion, it consists in developing applications that can be used easily by people who have little understanding of computers, this includes the "user friendly experience", "point-and-click", "plug and play" and other paradigms alike. On the other hand, *nix philosophy promotes developing applications that can potentially be used more efficiently by people who have a great deal of understanding of computers.
Both have their user base, and this is precisely the reason why Windows is the dominant OS; those that don't understand computers far outnumber those that do.
Added Aug 31 2009
, Modified Sep 01 2009 - 09:29 AM
Today it was the "open house" event at our sons' school, my wife Aurora and I attended the event, they are attending elementary for grades 1st. and 4th. The school is brand new as they finished construction literally about two weeks ago, the school itself is a large complex with the latest and coolest "school infrastructure". Apart from the usual Computer Lab, for example, computer stations are spread around the halls outside most of the classrooms, I managed to snatch up a picture of their secret weapons:

Click on the image for a larger version
Just think about how much money the school will save in licenses, "antivirus" (and their updates), not to mention the good the school will do to these kids' minds, go zebras! :)
Added Feb 11 2009
, Modified Aug 30 2009 - 03:03 PM
This is an update from my post originally published Feb 14, 2009, it has been updated and refined a bit, hope you find it interesting.
Since I traded my venerable MacBook for a powerhorse phenom PC, and then continued to my current setup, a nice Dell inspiron 530 running Fedora 11 (don't ask :), I returned to my roots and could not live without Linux after a while.
Moving out of the OS X (at least for the role as my primary computer) platform, you soon realize that there were many things one took for granted, such as the easy of setup of wireless connections, updates to the operating system, and most importantly, a nice gem that came with the Tiger and subsequent updates: Time Machine
I was one more of the lazy drones google-ing "time machine for Linux" almost every day, many options do exist, actually, but many of them I doubt were created by actual mac users, don't get me wrong, most of them work, but I wanted one that was smart enough to not just "copy" files, but synchronize, perform incremental backups and not duplicate the same data across the backups.
Have you ever wondered in a Mac how come a 500GB external drive can contain several snapshots of your home directory, and yet still have, say, half of the available disk space free?
OS X makes use of its own hard links equivalent, a hard link is really just a reference to a file in your filesystem, for example, assume that I have a file called myfile.txt, the contents of the file amounts for 1Kb worth of data, now, let's make a copy of the file to some other folder, something like this: cp myfile.txt ./somefolder. At the end of the process you will have 2 files, eating 2Kb of disk space. Now, say that instead of copying the file, you create a hard link for the file: ln ./somefolder/myfile.txt, at the end of this process you will have 2 files, eating up only 1Kb of disk space.
Something like this will happen in my version of the "Time Machine for Linux" (Or as I'd like to call it, a poor's man Time Machine), the trick is to first create a normal (via a copy/rsync/ssh) backup to your external hard disk, and then from there, just creating your subsequent backups by updating only what has changed, anything else remains as a "hard copy". What I just described is exactly what time machine does, so be confident. This is exactly the same way Time Machine works in OS X (except for the nice GUI Time Machine provides of course).
Assumptions
- You have an external backup drive mounted (for this example I'll use /media/LinuxTimeMachine)
Begin - Consider the source code below (explanation follows after)
- MOUNTPOINT="/media/LinuxTimeMachine"
- BACKUP_DIR="$MOUNTPOINT/Backups.teroknor/julio"
- SOURCE_LOC="/home/julio"
- MAX_BACKUPS=25
- LOG_FILE="${SOURCE_LOC}/bin/rsync.log"
- EXCLUDE_FILES="$SOURCE_LOC/bin/excludes.rsync"
- RSYNC_OPTS="-aHvxog --delete --progress --log-file=$LOG_FILE --exclude-from=$EXCLUDE_FILES"
- mountpoint -q $MOUNTPOINT || { echo $MOUNTPOINT is invalid or not a mount point ; exit 1; }
- [ -d $BACKUP_DIR ] || { echo $BACKUP_DIR not found ; exit 1; }
- if [ ! -L $BACKUP_DIR/latest ] ; then
- echo "Initial Backup, this may take some time..."
- rsync $RSYNC_OPTS $SOURCE_LOC/ $BACKUP_DIR/backup.0
- ln -s $BACKUP_DIR/backup.0 $BACKUP_DIR/latest
- else
- cur_backup=`expr ${MAX_BACKUPS}`
- if [ -d $BACKUP_DIR/backup.$cur_backup ] ; then
- rm -fr $BACKUP_DIR/backup.$cur_backup
- fi;
- for i in `seq ${cur_backup} -1 0`;
- do
- next_backup=`expr ${i} + 1`
- if [ -d ${BACKUP_DIR}/backup.${i} ] ; then
- mv $BACKUP_DIR/backup.${i} $BACKUP_DIR/backup.$next_backup
- fi;
- done
- rsync $RSYNC_OPTS --link-dest=$BACKUP_DIR/backup.1 $SOURCE_LOC/ $BACKUP_DIR/backup.0
- rm -f $BACKUP_DIR/latest
- ln -s $BACKUP_DIR/backup.0 $BACKUP_DIR/latest
- fi;
Information
Lines 15-21 - Modify them to suit your needs, Line 20 can be excluded providing that you remove --exclude-from=$EXCLUDE_FILES from line 21.
Line 16 - Make sure you create this directory structure in your backup drive before running the program, it'll be empty originally, but it'll be the location for your backups. Feel free to change the /Backups.teroknor folder to your liking, and the last folder as well.
Lines 44-51 - This is the final structure that you will end up with in your external drive.
Conclusion
I now have a fully-functional personal backup system that is smart enough to not copy entire files, performs an incremental backup and by using rsync as the transfer program, it will only update those parts of individual files (that were modified) that actually needed to be copied. All this has been tested with CentOS 4.5 (My production server) and Fedora 11 (My desktop system), I hope you find it useful as it was for me.
The next undertaking is creating a UI for this script, I believe this can be accomplished using a web-based approach, thinking of using web2py to provide this.
Any takers?
c o m m e n t s
f o r
Time Machine for Linux.. kinda..
Added 30 Aug 2009
, Modified 30 Aug 2009 - 05:05 PM
By
rj..@gmail.com
This style of backup is something I both need and want. Since
I am less hard core than you, I'll wait (im)patiently for someone
to create a GUI using [I hope...] Web2py, a fine framework.
Thanks for creating this handy utility!
ron k jeffries
http://identi.ca/ronkjeffries
http://blogt.eronj.com
Added 31 Aug 2009
, Modified 31 Aug 2009 - 01:31 AM
By
JulioF
Thanks Ron for your post,
The script above does indeed work exactly as TimeMachine does. I personally use it daily as my personal backup in fact I run it automatically as a cron job daily @ 11:00 on, a web gui does not sound like a bad idea at all, I was thinking making some sort of UI using wxwidweta or something like that. Creating an interface in web2py might just be the way to go, good thinking.
JulioF
Add a Comment
|
Start of Post |
Start of the Page