Purpose of this page is to explain step by step how to install and configure raspiBackup in 5 minutes to create a backup of your Raspberry very quick. This page describes for different platforms (Linux, Mac or Windows) how to restore the backup. After testing the backup and restore the next step should be to check which services have to be stopped before the backup starts. Finally cron should be configured to start raspiBackup on a regular base. Later on when you have some spare time read this page carefully to check which additional features of raspiBackup are useful for you and update the raspiBackup configuration accordingly. In any case it's strongly recommended to read the FAQ.

 

raspiBackup can be installed and configured similar to raspi-config. The installation script uses menus and selection lists. In addition primary options can be updated all the time by invoking raspiBackupInstallerUI.sh again. An update menu allows to update the installer and raspiBackup if new versions are available. If there are any issues please report the issue in a comment or even better - create in github an issue.

If you just want to install raspiBackup with a standard configuration without any individual configuration use options -i and -e (use -h for help). Then you have to configure raspiBackup manually by editing the corresponding configuration files. if you want to install raspiBackup manually visit this page.

 

Note: Users of putty should have remote character set UTF-8 selected in Window -> Transalation. Otherwise garbled characters are displayed as window borders by the installer.

 

Screenshot at 2019 04 10 07 53 08

 

The current installer can be downloaded, installed and started as follows in the commandline:

curl -s -L -O https://www.linux-tips-and-tricks.de/raspiBackupInstallUI.sh && sudo bash ./raspiBackupInstallUI.sh

Now you can select the install menu which installs raspiBackup by using a standard configuration (see below). All primary configuration options now can be updated in the configuration menu. Finally you can enable the weekly backup run started by cron.

You can start the installer every time in the commandline with sudo raspiBackupInstallUI.shto update the raspiBackup configuration or even to uninstall raspiBackup.

Note: raspiBackups cron configuration file is located in /etc/cron.d/raspiBackup. Use the installer to update cron settings in there. Be careful when updating the file manually. This may cause the installer to become unable to update the config file.

 

Attention

As soon as the first backup was created successfully start testing the restore also. In addition make sure the restore of the system you backed is tested on a regular base and the restored system still works. It's too late when you detect the backup is crap if you need it to restore your system.

In particular you should test the restore immediately whenever you use raspiBackup to backup a new System which uses a different or newer operatingsystem version. Every operatingsystem change may change output formats and can cause the restore to fail.

 

Create backup and test restore

When you finished raspiBackup installation and configuration create the standard mount point used by raspiBackup to save the backup with (assuming you use the default backup path)

sudo mkdir /backup

Now mount the external device (USB disk USB dongle, nfs drive ...) on this mountpoint. The following example uses an external USB disk or external USB dongle.

sudo mount /dev/sda1 /backup

Before starting the backup check that you mounted the right backup partition. Following commands will help on this:

sudo blkid -o list
mount | grep backup

or if you have labeled your partition

sudo blkid -o list | grep <label>

Now everything is ready to create a backup. Please note you have to configure raspiBackup to shutdown some services before backup later on when raspiBackup is used on a regular base. Read FAQ18 for details about this. If you don't have to stop any services or if you just want to test raspiBackup start the backup with following command. Depending on the size of raspiBackup this may take some time.

sudo raspiBackup.sh -a : -o : -m detailed

When the backup finished successfully then restore the backup on another SD card and test the restored image.

 

Standard configuration and created files

1) Configurationfile /usr/local/etc/raspiBackup.conf

This file configures raspiBackup. Standardconfiguration see following table. The settings can be overwritten with the installer. All other settings have to be updated with an editor or have to be passed as an invocation option.

Option Setting
Backuppath /backup
Backupmode normal
Backuptype rsync
Language System language
Zip no
Messagedetails normal
Services to stop none
services to start none
Backup number 3
Weekly backup off
Backup day Sunday
Backup time 05:00 AM

For details about the options see here.

 

2) Weekly backup configuration file /etc/cron.d/raspiBackup

This configuration file controls the weekly backup of raspiBackup. It's disabled in the standardconfiguration and can be turned on with the installer.

 

Next steps

When you created your first backup successfully and also restored it successfully you should check all the available options of raspiBackup on this page and use them if they help you. One important option is -e <eMailAdress>. This eMailAddress is used by raspiBackup to send an eMail with all Messages when a backup run finshed - either successfully or failed. In addition you can exclude directories, reduce the size of dd backups and much more.

Every option can be defined in /usr/local/etc/raspiBackup.conf so you don't have to pass it when you call raspiBackup. There are some options which can be configured only via the config file. For details see users guide.

 

Deinstallation

You can use the installer also to remove raspiBackup from your system.

 

Invoke installer without menus from the commandline

If you just want to install raspiBackup with it's default configuration you can do this from the commandline with some options. Any changes of the configuration now can be done manually. Same applies for the weekly backup cron configuration.  But you also then can use the installer with it's menus to configure the main options and the weekly backup. Just execute

sudo raspiBackupInstallUI.sh

Any further details for commandline options of the installer you will get with

sudo raspiBackupInstallUI.sh -h

Add comment

Note

Spam comments are purged and not published. Review is done manually and therefore it usually takes between some hours and one day until a comment will be published.