Apple's "Time Machine" Now For Linux... Sort Of
deander2 writes "Apple's 'Time Machine' is cool, but I use Linux, not MacOSX. So here is a Linux implementation (built off of rsync, of course). No fancy OpenGL, but quite functional none-the-less."
I have not used Leopard - so this is a real question, not a snarky response. My understanding was that a large part of what makes the whole Time Machine work and worthwhile is the interface. So if you don't have that, isn't it just another backup tool? Let me reiterate - this isn't a rhetorical question. Is doing the same thing without the interface sufficient or is it missing the point?
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
We've had backup systems for decades. Even Windows has a more functional system than Leopard by accounts I've read. What Leopard did is make backup and restore sexy to the point that people will actually want to do it.
"Flyback" is a replacement for, well, I'm not sure what. It's certainly nowhere near Time Machine whose primary innovation was "damn gotta get me that" user-friendliness.
Dewey, what part of this looks like authorities should be involved?
It's easier to just use rsnapshot.
"The great thing about multitasking is that several things can go wrong at once." -me
There's already been work on a Linux Time Machine, just not ready for prime time yet: TimeVault.
IMO, it is not the _interface_ that is cool about Time Machine, but the ease of use and the fact that it is fully automatic.
I didn't RTFA, so I don't know if this "Time Machine for Linux" implementation is as easy to use or not, but the real thing that makes Time Machine cool is that even my mother can use it.
The Ars Technica article about Leopard has lots of very cool details about Time Machine in it, including how it works. (It uses hard-links, including hard-links to directories, so in each and every time-stamped folder on the backup drive, you have a *FULL* copy of your HDD at that time (minus anything you excluded from the backups). Read that portion of the Ars Technica article if you want answers to questions about it.
What I'd like to see is a very simple source code control system, built on the same design. Perhaps one that would just serve the needs of a single programmer.
The essential thing is that it should look like a file system, with direct access to the project directories at any state in development... write access to the current version, read-access to previous versions... directly accessible to any piece of code via the normal file API.
There should be no need for copying files back and forth from a central repository to a working directory.
It should be equally friendly to text and binary files. It should not take much disk space to store versions of files that have not changed at all from one project version/label/whatever to the next. It is not necessary or desirable to store just the diffs between text files; in the year 2007 we really can afford the disk space to store an entire new source file even if only a few lines in it have changed.
It should not rely on some central database that can be a central point of failure if it gets corrupted.
It should reliably serve both the functions of version control and backup. Bells and whistles in version control are less important than backup. In particular, if it's on an external drive and the CPU fails, you should be able to plug that external drive into a new CPU and go on accessing it immediately.
To those who work on hundred-engineer projects that need full-bore version control and CASE tools and so forth, peace. I'm not talking about a one-size-fits-all solution. I'm talking about a lightweight, simple, minimalist tool that as far as I know doesn't really exist today.
"How to Do Nothing," kids activities, back in print!
I just drag my important files onto an external drive.
The whole point is that you don't have to do that, it happens automatically.
AND it catches all the files that you didn't think were important, but are.
AND it lets you roll the system back to the state it was in at any given time in the past (hence "time machine").
AND it takes care of any problems that can happen during backup (like "disk full", "power failure", etc.).
Can we get a "-1 Wrong" moderation option?
Claiming to have created a backuptool "inspired on" time machine obliges one to give some more documentation than... ehm... none. A few things I know about time machine, which are not trivial: Every backup in TM is a fully consistend directory tree for which no special software is needed to consult it. Disk space is saved by using hardlinks on the filesystem in a very delicate way, including hardlinks to directories (!!!). As a result, one can very selectively delete backups without corrupting anything. (e.g., you don't want to know the state 11 am, but do want to know the states at 10 pm and 12 pm? easy facilitated without any special software). TM uses a special feature in Leopard to keep track of modified files and directories, in such a way that TM itself does not have to scan for modified files, but is informed by the OS of modified files. This notification does not even require a deamon process. Now I do believe one can wrap together something which does backups. But standard unix/linux tools don't offer the above facilities - AFAIK. And rsync certainly does not facilitate multiple hardlinks to a directory to be made. Therefore, this shameless plug probably does not offer something similar to time machine. Unless the author also claims that a Trabant is something like a Ferrari.
(Find files that have been altered from last update -> Copy Said files to alternate drive in directory with the date as a name, make note of files that have deleted)
:|
Trivialising the technical underpinnings of Time Machine is unwise, and plays right into the hands of those who say Apple is all about show and lacks substance. In fact, the way Time Machine knows what files have been modified is really quite elegant and shouldn't be underplayed. I shan't go into the details of it all here, but if you are interested, see the relevant page of John Siracusa's excellent review of 10.5 over at Ars Technica.
In the meantime, you might like to consider learning how to spell.
I have had this type of rsync backups for years now on personal computers and servers. There are several scripts floating around the internet that do exactly what Time Machine does. The problem is 1) usability and 2) interface.
No end-user is going to put an rsync script in their cron jobs and specify in what mounted partition to store it and then later use rsync to restore the specified files. -- if an end user understands at all what I just said of course
Time Machine's interface is revolutionary. It gives you a way of looking back in time at your own computer and does it in a fancy way consistent with the interface. It does so for any Time Machine enabled application including Mail, Address Book, i*. If you have to restore a piece of mail from backup I doubt you'll know the name of the file it was stored in rsync or any other type of backup let alone knowing how to restore it without removing all the new messages.
Why did we always have to be bashing users for not creating their backups again? Because it was too difficult and too time consuming to make them. Time Machine takes literally 30 seconds to set up and the rest is automated. That's why people will start making backups. It's not difficult anymore and it's going to save me a lot of headaches.
Just my 2c.
Custom electronics and digital signage for your business: www.evcircuits.com
It's more of a way to recover your backup tool. So you are right, Time Machine is nothing without the interface. It sucks not being able to recover data easily, and sadly most other tools seems to concentrate on snazy ways to backup, not how to recover.
Think of it this way:
Rsync is to data what duct tape is to... well, everything else: it might not be pretty on a visual basis, but you'll be damned to find a better solution on a bang/buck basis.
Most geeks are pretty happy with duct tape and rsync. This will be difficult to change because geeks, nearly by definition, can see beauty beneath an ugly fascia.
More
Under Leopard, you can wipe your disk clean, put in Leopard DVD and reboot... one of the first options would be to restore system from Time Machine backup. With this tool, what is the point of including /bin, /usr etc. in the backup if there is no system restore support in Ubuntu installer?
Dirvish looks nice, but has the same problem so many cool Linux tools have. It stops short of being a backup "for the rest of us". An approachable GUI is important to most computer users as well as a "set it and forget" it maintenance cycle.
:)
However, most importantly hard links on directories were added to the OS so that entire unchanged directory trees would not be reproduced. This significantly reduces the number of files needed on the backup drive.
Hard to beat the Time Machine setup scenario: 1. Click the big ON button; 2. Pick a disk drive
Done
from the website:
http://www.ext3cow.com/
Ext3cow is an open-source, versioning file system based on ext3. It provides a time-shifting interface that allows a real-time and continuous view of the past. This allows users to access their file system as it appeared at any point in time.
Ext3cow was designed as a platform for regulatory compliance, and has been used to implement secure deletion, authenticated encryption, and incremental authentication. See the publications page for more details.
Some advantages of ext3cow:
1.
It does not pollute the name space with named versions
2.
It has low storage and performance overhead
3.
It is totally modular, requiring no changes to kernel or VFS interfaces
You can't be ahead of the curve, if you're stuck in a loop.
Both of those windows-based solutions, which have been out for quite some time, allow you to restore an individual file or folder from a wide range of dates. My setup backups files at midnight and 9am everyday, and I can any version of a file going back nearly 3 months. If I were to reduce the backups to once daily, 6 months of version changes on each file is plausible.
example: http://www.steveallwine.com/images/previousversions.jpg
The only arguement I can find about why Time machine is innovative is comparisons between it and system restore on the PC. Since these are two entirely different functions, I don't understand why its brought up.
A number of people have pointed out some of the major deficiencies of this software in comparison to Time Machine. There are a couple of items, however, that no one seems to be mentioning and which I think will have some of the biggest, long term effects. First, Time Machine includes easy APIs so that other programs can access the stored data from within their application. Second, it is included in the standard install so developers can rely upon it being there.
Why does this matter? Think of all the applications in which versioning would be really nice, but it just isn't available. Your address book, for example can look up old contacts or numbers or addresses. Your development tools can automatically load an older, version of that code you're writing to recover that function you did not think was needed anymore, even if you did not write it to a versioning server. Your video games can take you back to older saved games or versions of characters before you sold that really cool item. Photoshop, Word, OpenOffice, etc. can use it to revert changes to a file all the way back to last month.
The difference is that while many users will never take the trouble to learn how to use a backup system and properly recover an old version of a file, they might trouble to plug in a Time Machine drive and then use the interface to backed up versions from with their applications. It seems strange that everyone is ignoring the cool new API for developers and concentrating on the integration in the finder, which will probably be the lesser used portion of Time Machine.
Except rsnapshot uses rsync, which must rescan the filesystem. With Time Machine, the FSEvents daemon makes that unnecessary in the common case. Also, Time Machine uses hard links to directories.
That's not true. Read the link I posted above. rsync can create hard links, through the magical --link-dest option. This means that you never need to do full backups, or worry about keeping track of several versions.
/etc/cron.{daily,weekly,monthly}/.
/etc/snapshot/include.txt`
/usr/bin/awk 'substr($0,length($0),
You can set up rsync to do hourly, daily, weekly, and monthly backups, all taking up minimal (and I mean minimal) disk space, using hard links.
All you have to do is rm -rf your oldest directory of each kind (hourly daily, weekly, monthly) every time you run.
Heck, I'll even give you the BASH script I use to do this. Call it via cron: e.g. snapshot daily
#!/bin/bash
# This script makes a snapshot of several directories using rsync.
# Version 0.5, Rob Bos, September 8, 2002
# Modified by Pausanias August 2004
# This script is released under the terms of the
# GNU General Public License, version 2.0.
# run "hourly" from a crontab; run daily, weekly, and monthly from
[ -z "$1" ] && echo syntax: $0 snapshottype baselinesnapshottype && exit 1
type=$1 # hourly, daily, monthly snapshot?
logfile=/var/log/snapshot.log
backuproot=/Volumes/Sutton/ibackup
backup=`cat
excludefile=/etc/snapshot/exclude.txt
echo `date` >> $logfile
[ ! -e "$backuproot" ] && echo "$backuproot not mounted." >> $logfile && exit 1
# Assume that the baseline snapshot type is daily unless otherwise
# specified.
if [ "f$2" == "f" ]; then
basetype="daily"
else
basetype="$2"
fi
# if you run every two hours, make it 12, every hour, 24, etc. try to span the entire day.
# The below setting runs 8 times a day (every three hours), keeps 7 days, 4 weeks, and 12 months
# of backup.
hourlymax=8
dailymax=10
weeklymax=5
monthlymax=8
# This simplifies things down below so I can use $max to delete
# the overrotated snapshot, as well as $hourlymax/$dailymax to do
# rotation checks.
[ $type == "hourly" ] && max=hourlymax
[ $type == "daily" ] && max=dailymax
[ $type == "weekly" ] && max=weeklymax
[ $type == "monthly" ] && max=monthlymax
# Rotate the current list of backups, if we can.
if [ -d $backuproot/$type.1 ]; then
oldest=`ls -dt $backuproot/$type.* | tail -n 1 | sed 's/^.*\.//'`
echo Oldest is $type.$oldest >> $logfile 2>&1
for i in `/usr/local/bin/seq $oldest 1 -1`; do
mv $backuproot/$type.$i $backuproot/$type.$(( i + 1 ))
done
linkopt="--link-dest=$backuproot/$type.2"
else
linkopt=""
fi
if [ "$type" == "$basetype" ]; then
rsync -xva $linkopt --safe-links --delete --delete-excluded --exclude-from=$excludefile $backup $backuproot/$type.1/ >> $logfile 2>&1
elif [ "$type" == "daily" ]; then
[ -d $backuproot/hourly.$hourlymax ] && mv $backuproot/hourly.$hourlymax $backuproot/daily.1
elif [ "$type" == "weekly" ]; then
[ -d $backuproot/daily.$dailymax ] && mv $backuproot/daily.$dailymax $backuproot/weekly.1
elif [ "$type" == "monthly" ]; then
[ -d $backuproot/weekly.$weeklymax ] && mv $backuproot/weekly.$weeklymax $backuproot/monthly.1
fi
Because as is the case with a lot of things about windows, they don't seem to realize when they have a good thing. They wrote all the good backend code for a great feature, halfassed the UI so that the general populace wouldn't get it or want it, and then hid the entire shebang in the most expensive version of their software. Then again, there I go, thinking that maybe desktop users are MS's customers, as opposed to say - dell and hp.