ferstl.github.io

View My GitHub Profile

20 July 2017

Copy IPFire Backup to Synology Diskstation

by Stefan Ferstl

Running IPFire instead of a cheap plastic router is a good thing. But when your IPFire’s disk crashes, all the little settings that you have made over several years are lost (think of the last “smart” device that you allowed WIFI access). Fortunately, IPFire is able to create backups of its configuration in /var/ipfire/backup. Backups can be triggered via System -> Backup in the UI. Even better, IPFire automatically creates a backup before each update. So if you update IPFire regularly, you’ll also have recent backups.

In case of a disk failure all you need to do is buy a new disk, download and install IPFire and load the backup via a few UI clicks. However, “loading the backup” requires to backup the backup to a safer place beforehand. In this example, I’ll describe how to trigger the backup process directly, copy the backup files to a Synology Diskstation via SSH and how to setup the Diskstation to receive such backups. With a few tweaks the following steps will also work on other Unix-like systems.

Setup SSH Keys on the IPFire Host

Setup a SSH keypair, e.g. using ECDSA with 521 bit keys

ssh-keygen -t ecdsa -b 521

Configure Synology Diskstation to Receive the Backup

Setup a Daily Backup on the IPFire Host

Possible Improvements of this Post

tags: