Seite wählen

NETWAYS Blog

A personal Linux backup solution

Having personal backups is a must, but what can you do if you don’t have a mac that runs timemachine?
My first instinct was using the tool of choice of a friend: duplicity. It’s free software, does encryption and incremental backups, what more could you want? But duplicity does not offer a very user experience. The docs are work in progress, the –help is a bit of a mess and the man page is too verbose for a quick start. Obviously I have little problem reading and learning before using a tool, which is why I gave up and looked for a different one.
Restic does all what I want and duplicity can, but it has a good documentation, bash completion and other optional bonuses for making usage and, in turn, my life much easier.  It makes sense to think about what to backup before thinking about the right tool. I only want to backup from ~, I don’t care about `/etc` or other places with config or data, it would be no use to me when someone was to throw this laptop down a bridge. So just how much is lying around in my home directory?

$ du -h -d1 /home/jflach | grep "G"
1.9G	/home/jflach/i2
4.3G	/home/jflach/.ccache
20G	/home/jflach/git
108G	/home/jflach/vmware
6.6G	/home/jflach/.cache
20G	/home/jflach/Documents
1.2G	/home/jflach/.thunderbird
3.3G	/home/jflach/Downloads
5.6G	/home/jflach/.vagrant.d
171G	/home/jflach

Luckily I have no folder with an upper case „G“ in the name and I can see that over 50% are used up by vmare/. I don’t really need to backup my virtual machines, it’d be annoying to lose them but no reason to panic. `.ccache/`, `.cache/` and `Downloads` are completely irrelevant, bringing the total down to just above 50GB.
Back to restic. Creating a new local backup repository is easy:

$ restic init --repo /tmp/backup
enter password for new backend:
enter password again:
created restic backend 929fc4f740 at /tmp/backup
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.

Now the for the actual backup, I have a file containing the excluded directories:

$ cat ~/.config/restic.exclude
Downloads
vmware
.ccache
.cache

And the command is simply:

$ restic -r /tmp/backup backup ~ --exclude-file=.config/restic.exclude
enter password for repository:
password is correct
scan [/home/jflach]
scanned 10123 directories, 64039 files in 0:00
[11:07] 100.00%  76.166 MiB/s  49.612 GiB / 49.612 GiB  74162 / 74162 items  0 errors  ETA 0:00
duration: 11:07, 76.12MiB/s
snapshot dd45c515 saved

It took eleven minutes on my machine to encrypt and compress about 50GiB of data. Restic starts a few threads and voraciously consumes CPU time and memory as it runs. Get yourself a fresh cup of coffee, working is no fun while the tool runs.
All that’s now left to do is to copy the directory to some external server or hard drive. Restic offers support for common sync tools like sftp, google cloud or rclone, whatever you use it will be your job to automate and define its behavior.

OSBConf 2017 – It´s been great!

Bereits zum 9. fand in diesem Jahr die Open Source Backup Conference in Köln statt. Die rund 50 Teilnehmer scheuten keine Mühen und reisten aus Dänemark, Deutschland, Polen, Österreich, Schweiz, Spanien und den USA an, um sich über alles Neue zum Thema Open Source Backup zu informieren.
Mit dabei waren z. B. Vorträge renommierter Referenten zu verschiedenen Softwaretools im Bereich Open Source Backup Lösungen geben. Unter anderem sind dieses Jahr Didac Oliveira (Brain Updaters, SSL), Dr. Stefan Vollmar (Max Planck Institut) und Josef Weingand (IBM) dabei. Außerdem gab es traditionsgemäß Informationen zum Bareos Release, diesmal 17.2. Neben den Talks bot sich den Teilnehmern außerdem die Möglichkeit, einen von drei Intensiv Workshops zu den Themen Puppet for Bareos, Bareos Introduction und Scripting Bareos zu besuchen.
Für die rauchenden Köpfe nach dem ersten anstrengenden Workshoptag kam die wohltuende Entspannung in Form der Abendveranstaltung im Belgischen Viertel, genauer gesagt im Belgischen Hof ganz gelegen! Hier wurde bis nach Mitternacht geschlemmt und gequasselt, was das Zeug hält. Und wer sich das alles nicht vorstellen kann, der kann in Kürze die komplette Konferenz unter www.osbconf.org noch einmal Revue passieren lassen.
 
 

Markus Neder
Markus Neder
Head of Events & Training

Nach langen Jahren in der Hotellerie, hat sich Markus auf die andere Seite geschlagen und leitet nun bei NETWAYS die Event-Abteilung. Seine langjährige Erfahrung als Hotelmeister hilft uns jedes Jahr die beste Konferenz von allen die noch kommen werden zu veranstalten. Wenn er privat nicht mit seinen Kindern unterwegs ist, entspannt er am liebsten bei der Gartenarbeit oder beim Gitarrespielen.

OSBConf 2017 | 7 reasons | Final Part!

Hello again! Only two weeks left until the Open Source Backup Conference 2017 will start in Cologne, so don’t miss to grab one of the last tickets  for this unique open source event.

The conference will be held from September 25 to 26, 2017 at the Steigenberger Hotel in Cologne.
What awaits you: Core theme of the Open Source Backup Conference is the development and application of open source sofware solutions for data backup. The conference agenda covers the latest developments, conveys strategic knowledge and presents empirical reports as well as best practices, case studies and technical background. Apart from that, three hands-on workshops on September 25 are offered!
Have a look at this great talk by Thomas Otto about „The Backup Report of the Friedrich Schiller University Jena

YouTube player

Open Source Backup Conference – 7 reasons | part 4

Hello again! Today, we want to present the location for the special OSBConf evening event on the first conference day:

The restaurant “Belgischer Hof” is in the belgian quarter of Cologne and fascinates with it’s cozy and relaxed atmosphere. Take the opportunity to meet each other for networking and socializing in a casual setting. Enjoy the evening with some drinks and a variety of culinary delights.
The conference will be held from September 25 to 26, 2017 at the Steigenberger Hotel in Cologne.
What awaits you: Core theme of the Open Source Backup Conference is the development and application of open source sofware solutions for data backup. The conference agenda covers the latest developments, conveys strategic knowledge and presents empirical reports as well as best practices, case studies and technical background. Apart from that, three hands-on workshops on September 25 are offered!
Have a look at this great talk by Christian Reiß about Backup with BAREOS and ZFS. 

YouTube player