20

I know this article but there is no comparison to OSX's TimeMachine. I would like to find a backup software which is about the same as TimeMachine or better.

I would like to have such a software which can use some format of HDD which is suitable for big files (50 GB) in Linux. I noticed that

  • OSX format of HFS+ is not supported by Linux distros, since no maintainer of HFS in Linux since 2006
  • NTFS format made by Debian 8.1 is not supported by older Linux distros

If Windows support, good.

Try with the Backups (Deja Dup) software

I did start the backup first time but I wanted to go to lunch after backup was running already two hours of just 10 GB files. So it gave me this after the lunch

enter image description here

which is really insane, reported now here, since the software is not designed to have pauses in doing the backups.

6 Answers 6

11

You can use Cronopete. Cronopete is a backup utility for Linux, modeled after Apple's Time Machine. It aims to simplify the creation of periodic backups.Launchpad.

To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-add-repository ppa:rastersoft-gmail/cronopetedev
sudo apt-get update
sudo apt-get install cronopete

To install from source, see Here

Or you can try Back In Time. Back In Time is a simple backup tool for Linux inspired from FlyBack and "TimeVault".Back In Time / Launchpad.

To install just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-add-repository ppa:bit-team/stable
sudo apt-get update
sudo apt-get install backintime-qt4

On a personal note, I use Systemback for all my backups, archiving, and imaging. To install it, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository -y ppa:nemh/systemback
sudo apt-get update
sudo apt-get install systemback
8
  • 1
    I really can't answer that, but if I have to guess its up to the publisher. As far as Systemback, see added info in my answer. Hope that helps.
    – Mitch
    Jul 12, 2015 at 17:30
  • 1
    The only backup application that I'm aware off that comes with Ubuntu is Déjà Dup.
    – Mitch
    Jul 13, 2015 at 7:26
  • 1
    I need to have multiple restore points, that's why I use Systemback.
    – Mitch
    Jul 13, 2015 at 8:54
  • 1
    @Masi backintime is in Ubuntu's default repositories. But it's an older version 1.0.36. Current version is 1.1.6. This is because the package is derived from Debian. Disclaimer: I'm member of BIT Dev-Team
    – Germar
    Jul 15, 2015 at 2:16
  • 1
    @Masi that was Déjà Dup and not BackInTime. Please report this bug at Launchpad.
    – Germar
    Jul 15, 2015 at 14:59
4

If you don't mind working with the console try backup-manager, it comes along with the distribution. The handling is done with one config file sitting in /etc.

sudo apt-get install backup-manager

To modify the file you could use nano in the console.

sudo nano /etc/backup-manager.conf

You won't need most of it. What I personally like is, that no additional packages are needed.

Here is a small example of a backup.

Where to store the files?

##############################################################
# Repository - everything about where archives are
#############################################################

# Where to store the archives
export BM_REPOSITORY_ROOT="/var/archives"

choose your Directory, where to put the files.

Pay close attention to the following settings there

# For security reasons, the archive repository and the generated
# archives will be readable/writable by a given user/group.
# This is recommended to set this to true.
export BM_REPOSITORY_SECURE="true"

# The repository will be readable/writable only by a specific
# user:group pair if BM_REPOSITORY_SECURE is set to true.
export BM_REPOSITORY_USER="root"
export BM_REPOSITORY_GROUP="root"
# You can also choose the permission to set the repository, default
# is 770, pay attention to what you do there!
export BM_REPOSITORY_CHMOD="770"

If you backup something like /home or /movie you might leave this option on, so only root and the root group might be able to access the backup

For a server backup (e.g. a multi user server and/or folders like /var/www/ /opt/ /etc/ /var/) you might consider setting this option to false to preserve ownership/accessability of the files after a restore. Otherwise you'll need to manually set them after a restore.

Choose your backup-method

##############################################################
# Archives - let's focus on the precious tarballs...
##############################################################

# The backup method to use.
# Available methods are:
# - tarball
# - tarball-incremental
# - mysql
# - pgsql
# - svn
# - pipe
# - none
# If you don't want to use any backup method (you don't want to
# build archives) then choose "none"

choose

export BM_ARCHIVE_METHOD="tarball-incremental"

Choose the directories to backup

Further info can be found in the section

 ##############################################################
 # Section "TARBALL"
 # - Backup method: tarball
 #############################################################

Here I checked the following options

export BM_TARBALL_FILETYPE="tar.bz2"
export BM_TARBALL_DIRECTORIES="/etc /var/www /home/wikibackup"

Choose rotation of master and incrementals

##############################################################
# The tarball-incremental method uses the same keys as the 
# tarball method, plus two others.
#############################################################

I've choosen to do weekly full backups on monday (first day of the week). That means every monday I get a full backup and the rest of the week will be saved in different smaller incremental files. So restoring them would mean. Resotre the full backup and after that the incremental files, to get back the latest backup of your data.

export BM_TARBALLINC_MASTERDATETYPE="weekly"
export BM_TARBALLINC_MASTERDATEVALUE="1"

Cronjob

Use a simple cronjob to do the backup automatically

sudo -i

crontab -e

Enter the following

00 03 * * * /usr/sbin/backup-manager >/dev/null 2>&1

If you need a notification email remove this part

>/dev/null 2>&1
6
  • 1
    It is part of Ubuntu for a long time, so you should find it on older Ubuntu Versions too. Haven't checked for 16.04 so far, but my guess is that it is also in there. It makes use of tar, bz2, etc. These are always part of Ubuntu Distris. It also can dump mysql databases. It can also use gnupg for encryption. You can move files via ftp. You can use incremental backups. It uses checksums. But you need to be willing to invest some time and test the features, not everybody wants that ^^
    – s1mmel
    Jul 4, 2016 at 15:20
  • 1
    One thing though it can't do. It's for backing up data, not a all in one restore from scratch tool. If you need somethign like that use Clonezilla, this copies the whole drive 1to1.
    – s1mmel
    Jul 4, 2016 at 15:22
  • 1
    Can you please provide basic steps in making backups with backup-manager. I feel that the options are not complete enough, since the goal is also to provide backups with simplicity in mind*. They seem to be much limited but I may be wrong. It would be great to see how you can combine the command. I cannot find anything about MySQL in the docs. I would really love PostgreSQL for the task. Jul 4, 2016 at 15:36
  • 1
    sure. i just need to find some spare minutes at work. i'm using it myself to backup our wiki at work.
    – s1mmel
    Jul 5, 2016 at 5:20
  • If you need a notification email remove this part >/dev/null 2>&1 How does one set the email ? Jan 17, 2020 at 17:08
4

TimeShift

It has a simple graphical interface but you can also use it from the terminal.

sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update && sudo apt-get install timeshift -y
3
  • This is great for system restore because by default it ignores /home and /root
    – Tomachi
    Oct 28, 2021 at 15:33
  • Note that with TimeShift you cannot backup to a network drive, local drives only.
    – Matt M
    Feb 22, 2022 at 3:27
  • 1
    Not true, just mount a remote location to a local folder and exclude the folder from TimeShift.
    – MS Berends
    Nov 5, 2022 at 12:35
4

linux-timemachine is POSIX compliant bash script that aims to mimic the behavior of OSX's timemachine. It uses rsync to incrementally back up your data to a different directory, hard disk or remote server via SSH. All operations are incremental, atomic and automatically resumable:

# Recursive, incremental and atomic backup (locally)
$ timemachine /source/dir /target/dir

# Recursive, incremental and atomic backup (via ssh)
$ timemachine /source/dir user@host:target/dir

Backups are always done incrementally using rsync's ability to hardlink to previous backup directories. You can nevertheless always see the full backup on the file system of any incrementally made backup without having to generate it. This will also be true when deleting any of the previously created backup directories. See the Backups section for how this is achieved via rsync.

I add it as a cron from webmin - a Web GUI for administering any linux box - which is under System -> Scheduled CRON Jobs. I like to have it run every 6 hours.

Put ionice nice in front will keep your machine responsive and quieter. Run iotop to see disk bandwidth. AFAIK macOS would also run very niced and also pause for around 10 seconds on activity somehow: I kinda like Apple's over the top polish here.

1
  • iotop I see had an 'i' key to set ionice .
    – pierrely
    Dec 27, 2022 at 6:33
0

I do not recommend Deja-dup because it is not close to Time-Machine in features, and is unstable with many filesystems. I have not managed to get proposals of Mitch sufficient in features for my needs. They break too much.

Niceness of the Process

Nice will lower the cpu priority, freeing cpu power for other processes, ionice will reduce the disk priority, freeing the disk i/o for other processes). Use tar czf with nice as described here separately for the system and home such that you can easily work vertical with your systems in many projects

# http://unix.stackexchange.com/a/291720/16920
sudo nice tar czf /media/masi/ntfsDisc/backup_system_24.6.2016.tar.gz --exclude=/home \
    --exclude=/media --exclude=/dev \
    --exclude=/mnt --exclude=/sys \
    --exclude=/run --exclude=/proc /

sudo nice tar czf /media/masi/ntfsDiscSami/backup_home_24.6.2016.tar.gz $HOME/

Limit CPU consumption of the Process

Assume you have a limited system etc ultrabook with 20 Mb/s read/second. If you do not know it, use

# http://unix.stackexchange.com/q/291713/16920
tar cf - $HOME/ | pv | gzip > media/masi/ntfsDisc/testbackup.tar.gz

Then, limit your CPU and do

# http://unix.stackexchange.com/a/292659/16920
tar cf - $HOME/ | pv -L 10m | gzip > /media/masi/ntfsDisc/testbackup.tar.gz

Move Computation to GPU

TODO Future

2
  • 1
    Has anyone else use the method described here by Masi?
    – JoHKa
    Oct 31, 2016 at 20:29
  • Yes, just google masi and relevant commands. It is standard in many places nowadays. Oct 31, 2016 at 20:33
0

This is certainly not the most TimeMachine-like program you ask for, but a solution that works, and because implemented as bash scripts, modifiable and extendable:

Create backup of your directory using the Zaloha.sh synchronizer:

$ Zaloha.sh --sourceDir="test_source" --backupDir="test_backup"

Then create a hardlink-based snapshot of your backup directory using Zaloha_Snapshot.sh:

$ Zaloha_Snapshot.sh --backupDir="test_backup" --snapDir="test_backup_20200101"

Official repository is here: https://github.com/Fitus/Zaloha.sh

The official repository contains simple working demos and a comprehensive documentation that explains how it works.

1
  • Synchronization is not a backup.
    – Alexander
    Jun 20, 2021 at 1:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .