Slashdot Log In
Apple's "Time Machine" Now For Linux... Sort Of
Posted by
CmdrTaco
on Wed Nov 07, 2007 10:41 AM
from the because-you-can dept.
from the because-you-can dept.
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."
Related Stories
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Question (Score:5, Insightful)
Not the interface (Score:5, Insightful)
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.
Parent
Re:Not the interface (Score:5, Insightful)
What's the difference? The interface is how you use software. If it's easy to use, it has a good interface.
Parent
Re:Not the interface (Score:4, Informative)
One can set it up once with the goofy 3d zooming thingy and then it'll happen automatically in the background. Need a file that you know was good a week ago? In term, type "cp
Most backup solutions require you use their software to restore from backup. If I interpreted the parent right, Leopard doesn't.
Parent
Re:Not the interface (Score:5, Funny)
Parent
Re:Not the interface (Score:5, Informative)
Think of it as CVS. It tages backup times but actually only copies new data as it's checked in.
Also, TM is not confined to the Finder per say. if you're in Address Book and lost a contact, type in the filter string to locate it. Still can't find it? Right there from Address Book, hit Time Machine and Address Book will be served with backed-up address book data, filtering on the fly, as you go back in time until you find what you've been looking for.
Same thing for anything spotlight-able.
So, yeah, it's got a pretty interface, but TM goes way beyon just file/backup management.
Parent
Re:Not the interface (Score:5, Informative)
Parent
Re:Not the interface (Score:5, Funny)
Isn't that supposed to be "seing"?
[duck/run]
Parent
Re:Not the interface (Score:5, Funny)
And when I use incorrect French on a French website, you're welcome to correct me. I'd rather write correctly, thanks.
Parent
Re:Eh... (Score:4, Interesting)
I've seen clumsy interfaces that let you grab a backed up file from within a backup before, but never one that lets you preview - let alone do all this from within other applications.
Parent
Re:Eh... (Score:5, Interesting)
Parent
Re:Eh... (Score:5, Interesting)
Parent
Re:Not the interface (Score:5, Informative)
Parent
Re:Not the interface (Score:5, Insightful)
Time Machine's ability to simply browse backwards through time in the folder, whilst still having the folder functionality usable is far beyond BackupPC. Indeed I bet there are many times that you just want to do this, you don't want to restore the file or the folder as it was then, you just want to quickly glance inside the file as it was.
There's nothing amazingly clever about Time Machine, but it is Apple "Getting It Right(tm)" interface-wise (excluding silly starfield, etc) and functionality-wise.
Parent
Re:Not the interface (Score:4, Informative)
I agree it is not just Backup software.
However, this is ALSO why 'previous versions' in Vista is more than a snapshot/backup interface as well. In Vista you can view folders as they exist at any previous time and even drag and drop the folder or files you want from the folder at a specific time in history.
Time Machine = 3D Interface of Files/Folders
Vista = Timeline List of Files/Folders
Time Machine = Uncompressed Backups to External Drive
Vista = Compressed Backups ANYWHERE + File Version Snapshots on main Hard Drive + Works on Servers and across networks (ie Can use Previous Versions on Folders/Files you have access to on Servers or other computers, and it displays that folder's snapshots and backups.)
Time Machine = Great Marketing
Vista = MS's Sucky Marketing
So Time Machine gets the cool buzz, when Vista is the cooler of the two technologies...
Parent
Re:Not the interface (Score:4, Insightful)
So it is the interface, then?
I realize the interface doesn't do the heavy lifting in an application, but I wish the FLOSS crowd would finally clue in to the fact that ease-of-use matters. For example, GnuPG is a way to protect your privacy through encryption, but it only has a CLI. GUIs exist for GnuPG, but their installation is complex. Why do people work on GnuPG? Because privacy is important! But who gives a fuck when only 1% of the population can use it? Thanks for nothing, GnuPG!
I have no particular bee in my bonnet about GnuPG, it was just the latest FLOSS effort to piss me off. Open-Source software and "Free as in Freedom" are ideas too important to be relegated to the technical elite, but the technical elite's refusal to make their tools easy enough for the rest of us cuts out most of society. You have the cure for cancer but refuse to give it to us because we don't have the time or desire to learn Perl.
This Linux "Time Machine" sounds cool. Too bad I'll never be able to use it. Bah!
Parent
Re:Not the interface (Score:5, Insightful)
Parent
Re:Time Machine has been around for a while... (Score:5, Informative)
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
Parent
Re:Question (Score:5, Insightful)
In my opinion, without such a method for watching FS changes as they occur (or later, from a log), any hackish solution will fall far short of Time Machine's performance.
Parent
Re:Question (Score:5, Interesting)
Actually, I have mixed feelings about having a daemon following inotify (fsevents equivalent for linux) in order to backup. My setup uses backuppc [sourceforge.net], which daily rsyncs my disk and backs it up using much the same archival solution that Time Machine uses. The rsync is non-noticeable (and, in my case occurs during working hours). An inotify daemon, on the other hand, could be responding to lots of small requests that produce null results (temp files, disk writes over the same sectors, etc).
Fine-grained backups may be interesting, but I wouldn't be interested in any kind of performance drag because of it. Daily backups have served me just fine, thanks.
Parent
FS with snapshotting (Score:4, Interesting)
Parent
Re:FS with snapshotting (Score:4, Informative)
Parent
Re:Question (Score:4, Informative)
Parent
Re:Question (Score:5, Informative)
Parent
Recovery tool is better than a backup tool (Score:5, Insightful)
Parent
Re:Question (Score:5, Insightful)
I don't know whether this Linux implementation does something like it, but what I like most about Time Machine isn't the interface. It's the fact that the backup utility takes care of disk management automatically.
My current backup strategy works something like this:
If I were smart and vigilant, I would catch when the archive reaches about 30 GB, and create a new one then, so that managing older archives could be done in more tractable chunks. If I were rich, I would just buy a number of external drives that I would rotate as they filled up. But I am apparently neither, so I just get stuck in this cycle in which I only have a current backup 1/3 of the time, and older archives are randomly discarded or distributed wherever I can find the space.
The great thing about Time Machine is that it consistently fills up my disk with the most relevant backup data: current backups at a high frequency, and months-old backups at a low frequency. When space runs out, the oldest data gets thrown away, but the quantum chunk is a diff between backups, not an entire 80 GB archive.
Parent
Re:Question (Score:5, Insightful)
What if you deleted that email you really wanted, or made a bad edit to a contact in your address book, or a photo in iPhoto/Picasa? These apps store lots of data in some kind of database. As a geek, you know that you need to find this database, move the current one aside, restore the old one, export the content you want from the app, move the current database back into place, and import the content you just extracted from the old database.
With TM, Your Mom opens Mail, and presses the TM button. She gets the same 'windows through time' view, listing her mailbox at each checkpoint. She selects the message(s), and hits the restore button, and it gets brought into the current database. She doesn't care how it gets represented on disk.
See this screenshot: The user isn't browsing files, they are browsing contacts: http://scrap.dasgenie.com/images/017-TimeMachine.png [dasgenie.com]
TM is implemented as file-based backup (with a few less common twists), but that isn't how the UI presented to the user. Without the UI, it's Yet Another Backup Solution.
Parent
So ... (Score:4, Insightful)
Re:So ... (Score:5, Insightful)
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.
Parent
Completely misses the point (Score:5, Insightful)
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.
Re:Completely misses the point (Score:5, Informative)
Parent
hard link directories (Score:5, Interesting)
It's easier to just use rsnapshot [rsnapshot.org].
Ubuntu TimeVault (Score:5, Informative)
Re:Ubuntu TimeVault (Score:4, Informative)
Just curious, is there any really good reason not to serve everything over HTTPS?
Parent
Why not a simple SCCS? (Score:5, Interesting)
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.
Re:Why not a simple SCCS? (Score:4, Informative)
How about mounting a webdav file system with a subversion backend that has autoversioning turned on? That way, every time you write to the filesystem, SVN will make a new version. I did this for an office file server and installed track to point to the same repository. So now people have a cheap web interface to view revisions of documents.
http://svnbook.red-bean.com/en/1.2/svn.webdav.autoversioning.html [red-bean.com]
All the Mac's in the office mount the webdav repo, my linux box mounts it via fuse, and even windows has "web folders". It was kind of a fun project that turned out to be pretty useful.
--Ajay
Parent
"something like"=/=real thing. technology missing (Score:4, Insightful)
Rsync backup is not Time Machine (Score:5, Insightful)
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.
Restore support in Linux installer (Score:4, Interesting)
Rsnapshot (Score:4, Informative)
Rsnapshot is an rsync-and-hard-links based scheme that also doesn't store duplicate data, and provides nice date-indexed browseable full file trees, much like the way both "time machine" and this flyback gizmo are described.
I haven't been this excited since AOL re-invented "ytalk"...
Re:Rsnapshot (Score:5, Informative)
Parent
Introducing ext3cow! Time-Machine for Linux (Score:4, Informative)
http://www.ext3cow.com/ [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
What's so new about Time machine? (Score:4, Insightful)
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 [steveallwine.com]
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.
Other Things Missing (Score:5, Insightful)
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.
Yeah, makes me wonder ... (Score:5, Informative)
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.).
Parent
Re:Yeah, makes me wonder ... (Score:5, Insightful)
Or another scenario that's a bit more likely (especially with email inboxes it seems), the mail database gets corrupted, and before you realize it, the automatic backup overwrites the good copy on your backup disk with the corrupt one. I know of a few people this has happened to.
Time Machine is a very good thing, and I commend Apple for it, especially since their old backup app sucked, and wasn't even included in the OS.
Now, how about getting network backups to work properly, and patching Time Machine to gracefully deal with large files?
Parent
Re:No Open Source Invovation here! (Score:5, Informative)
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 [arstechnica.com] of John Siracusa's excellent review of 10.5 [arstechnica.com] over at Ars Technica.
In the meantime, you might like to consider learning how to spell.
Parent
Re:Innovation (Score:4, Insightful)
Parent
Re:I'm too lazy to do any research... (Score:4, Insightful)
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
Parent
Re:Warning! Do Not Use! (Score:4, Funny)
"That's not a gloryhole, that's a..."
(Who didn't know that was coming?)
Parent