My backup strategy

I am running a couple of servers, two desktop computers and two mobile phones - all carrying data that I would hate to lose. Over the years I had my share of data losses and I found that it's better to have automatic backup setup before anything bad happens. See PEAR server fully restored, Android 6: Recovering deleted files and Wieviel sind Ihnen die Daten denn Wert?.

Mobile phones

The import data on our Android mobile phones are contacts, calendar entries, photos and notes. They need to be backed up automatically.


Contacts (names, addresses, telephone numbers) are automatically synchronized to our public Nextcloud server with DAVdroid.

Calendar events

Calendar entries are synced via DAVdroid to Nextcloud, too.


Photos and videos taken with the phone are automatically uploaded when Wifi is available with the Nextcloud Android app.


We use Tomdroid to take notes on our phones. They are synchronized to our Nextcloud server, which runs the Grauphel extension for note sync.

Personal computers


Notes are taken with Tomboy and synchronized to our public Nextcloud server (with the Grauphel extension).


I mainly use my laptop for development on the train to and from work. It also contains all my emails (from 2000 to now).

That machine has no automatic backup. If I don't forget it, I start a rsync script every month that copies most of my home directory onto the NAS server over SSH.

I also have a second backup script that copies those data to an external harddrive attached via USB. That is used once a year.


Documents are automatically copied onto our internal Nextcloud server with the Nextcloud desktop client.


Our desktop computer is used for everything except programming: Managing our photos and videos, cutting videos, document management, email, playing games.


We use Digikam to manage our photos and get them off the camera's SD card.

The Nextcloud desktop client synchronizes the images immediately to our internal Nextcloud server.

Photos taken via mobile phones are synchronized from our public Nextcloud server onto the desktop.


New raw video footage is manually copied every couple of months to a huge external harddisk that only exists for raw video files.

After cutting and post-processing, the final videos are copied manually to our file server (NAS).


Documents are automatically copied to our internal Nextcloud server with the Nextcloud desktop client.

The laptop's documents are copied in read-only mode from the internal Nextcloud server to the desktop computer.

Other files

Duplicity is automatically backing up the home directories onto our file server.


Every day, my home server uses rsnapshot to make a full backup of the PEAR website, packages and other relevant files onto the file server. rsnapshot also runs a mysqldump script that backs up the blog and website database into a single file.

rsnapshot creates daily, weekly, monthly and yearly backups via hardlinks. This saves a lot of space while still allowing me to go back to earlier versions.

Public webserver

My public web server is running many services: Websites, databases, e-mail, git, Nextcloud (photos + videos + notes of mobile phones).

The home server runs rsnapshot to backup the files onto our file server:

Websites are not backed up because they have their content either in a git repository and/or in the MySQL database.

Home server

My home server runs an internal Nextcloud instance that collects images and documents from the personal computers, and the central LDAP address book.

rsnapshot is used to backup those files to the file server every day.

File server (NAS)

All backup files eventually end up on the file server.

The file server uses RAID 1 to mirror files onto two disks, so that they are safe from a harddisk failure.

Every year I open the safe, take out the external backup harddisk and copy all files from the file server onto it. This should make the data safe from power surges and lightning strikes.

Also every year, I drive to my father's house, get the second external backup harddisk and copy all files from the file server onto it. That way the data will be safe even if our house and our safe burns down.


Here all of that in a nice diagram:

cweiske's backup strategy

Written by Christian Weiske.

Comments? Please send an e-mail.