How to create a restore point in Ubuntu?

2

2

Like Time Machine in Mac OS X. Is it possible?

webnat0

Posted 2011-01-22T21:24:32.663

Reputation: 205

:O Mac OS X has a time machine? I need to go back and fix a few things... time to go buy a Mac. – user541686 – 2011-01-22T21:27:21.463

(Btw, this is probably a SuperUser.com question...) – user541686 – 2011-01-22T21:27:49.423

Answers

3

Yes, but it depends a bit on what exactly you want to achieve.

  • Incremental backup of the entire system: This is what Time Machine does, and you could do it by using rdiff-backup or duplicity. These tools can do incremental backups to external drives, network storage etc. The most current backup can simply be copied back, and to restore older versions, you'll need a simple shell command. The only "losses of functionality" compared to Time Machine are that some special files can't be handled by those tools, and there is no way to boot a freshly-repaired machine from a rdiff-backup volume like you can do with a Time Machine volume.

  • Recovering from errors made during testing packages: There's etckeeper, a nice tool that stores all changes to /etc into a revision control system of your choice. So, in order to "go back to a system state before $PROGRAM messed up everything", you uninstall the problematic package and use etckeeper to undo all changes to your system configuration.

In both cases, there's no GUI like Time Machine provides.

(Oh, and sorry for not linking to every tool, there's a link limit for new users...)

jstarek

Posted 2011-01-22T21:24:32.663

Reputation: 928

1

(The following text was rejected as improvement to @jstarek's answer and instead asked to provide as separate answer)

Yes, but it depends a bit on what exactly you want to achieve.

  • Incremental backup of the entire system (this is what Time Machine does): The following tools can do incremental backups to external drives, network storage etc. The most current backup can simply be copied back, and to restore older versions, you'll need a simple shell command. The only "losses of functionality" compared to Time Machine are that some special files can't be handled by those tools, and there is no way to boot a freshly-repaired machine from a rdiff-backup volume like you can do with a Time Machine volume.

    • AMANDA (last stable: 3.3.8 @ 2016-01-20) Advanced Maryland Automatic Network Disk Archiver, a backup solution that allows to set up a single master backup server to back up multiple hosts over network to tape drives/changers or disks or optical media.

    • Back In Time (last stable: 1.1.12 @ 2016-01-11) Back In Time is a simple backup tool for Linux inspired from “flyback project” and “TimeVault”. The backup is done by taking snapshots of a specified set of directories.

    • duplicity (last stable: 0.7.06 @ 2015-12-07) Duplicity backs directories by producing encrypted tar-format volumes and uploading them to a remote or local file server.

    • FlyBack (last stable: v0.6.5 @ 2010-05-05): FlyBack creates incremental backups of files, which can be restored at a later date

    • rdiff-backup (last stable: 1.2.8 @ 2009-03-16) rdiff-backup backs up one directory to another, possibly over a network. The target directory ends up a copy of the source directory, but extra reverse diffs are stored in a special subdirectory of that target directory, so you can still recover files lost some time ago. The idea is to combine the best features of a mirror and an incremental backup.

    • TimeVault (last stable: 0.7.5-1 @ 2009) TimeVault, monitors files for changes and is a simple front-end for making snapshots of a set of directories. Snapshots are a copy of a directory structure or file at a certain point in time.

  • Recovering from errors made during testing packages:

    • etckeeper (last stable: 1.18.2-1 @ 2015-08-04), a nice tool that stores all changes to /etc into a revision control system of your choice. So, in order to "go back to a system state before $PROGRAM messed up everything", you uninstall the problematic package and use etckeeper to undo all changes to your system configuration.

Note: Not in all cases, there's a nice (mostly just basic) GUI like Time Machine provides. The tools mentioned above have been recommendations or just represent well-known tools, found in various forums. However, for a complete overview please check also Wikipedia's List of backup software.

Jim McAdams

Posted 2011-01-22T21:24:32.663

Reputation: 165

1

How about Back In Time or TimeVault? Back In Time uses rsync and can be scheduled to run automatically. Both tools have a GUI but I don't think either of them does the fancy graphics.

Still might be worth looking into to see if it suits your needs.

Patrick Bulteel

Posted 2011-01-22T21:24:32.663

Reputation: 11

0

The rsync command supports --link-dest, which creates hard links for files that were already in an earlier backup. Like:

#!/bin/sh

# Mount point of the external disk
dest=/media/backupdisk

date=`date "+%Y%m%d-%H%M%S"`
latest=$dest/latest
current=$dest/$date

rsync -aP --link-dest=$latest $HOME/Documents $current

ln -s $current $latest-$date
mv -f $latest-$date $latest

The blog post Time Machine for every Unix out there (not mine) and its comments have many more details, and alternatives such as FlyBack - Apple's Time Machine for Linux.

See also my answer in Time Machine on Ubuntu? about being very careful when cleaning up backups that use hard-linked folders. Another answer mentions rsnapshot, which seems nice.

Arjan

Posted 2011-01-22T21:24:32.663

Reputation: 29 084