It's possible to add custom code which is executed before and after the backup process via two script extensions. They are useful if modification of the backup script is required to extent the script capabilities and will be lost and thus have to be merged again and again every time when raspiBackup will be updated.

Three sample plugins are available and can be used as templates for new plugins. The first three report the CPU temperature, memory utilization and backup partition usage pre and post a backup run. The last one is called at the end of the backup and can be used to execute different actions depending on the success or failure of raspiBackup.

If you create your own plugin please share it with the community and announce it's availability in a comment. If there is any function missing for the plugin please write a comment and I'll check whether it's possible to provide the missing function.

Seq Nr Requests Status Comment


 Restore writes following message

"WARNING: GPT (GUID Partition Table) detected on '/dev/mmcblk0'! The util fdisk doesn't support GPT. Use GNU Parted."

This message can be ignored but should not be written any more

done  available with version 0.5.14


Write more progressing messages during backup

done available with version 0.5.12


Don't use /mnt for restore any more

done available with version 0.5.13


Unpartitioned SD cards create issues during restore (See

done available with version 0.5.13


Use a new flag (e.g. -z) to enable zip function for tar and dd. Backuptypes ddz and tgz should be removed

done available with version 0.5.10


Create a website which lists all changes and enhancements

done see


Notify in eMail (if there was one defined) when there is a new script version available

done available with version 0.5.11


Keep documentation current (see also #6)



Save more than 2 partitions (includes NOOBs support for backuptype tar and rsync)

done available with version 0.6.1





Date Version Changes and new features

1) Improvement: Extended attributes and access control lists are supported when using tar backup. See github

2) Improvement: Restore termination improvement

3) Improvement: /boot can be on mmcblkXp0 where X can be > 0

4) Bugfix: -U check detects the current version is identical to the latest available version

5) Improvement: New option -B will save the boot partition in a tar file. See github

6) Improvement: New option -C will enable bad block checking when partitions are formatted. See github

7) Other minor improvements


1) Improvement: There exists another extensionpoint which is called just before starting the backup . That way it's possible to access internal variables of raspiBackup like the backup directory name. See also this git issue

2) Improvement: Test whether symlinks can be created on backup partition if rsync is used. git issue

3) Bugfix: Fixed errorhandling of backuptools. git issue. Bug exists since v0.6.2.

4) Bugfix: Fixed DHCP restore problem with tar (acls and xattrs saved) Update 12/11: Removed

5) Bugfix: raspiBackupRestore2Images failed on Stretch

10/3/2017 0.6.3

1) Improvement: Starting with Debian9/Stretch and sfdisk 2.27.1 the messages format changed. Debian8/Stretch is now supported by raspiBackup

2) Bugfix: Stopped services will be started again when backup is aborted with CTRLC

3) Improvement: Better error message handling

4) Bugfix: When using the fake mode the new empty backup directory will be deleted

5) Improvement: Display progress when creating a backup or restoring backup

6) Bugfix: Partition oriented backup supports > 9 partitions

7) Improvement: Boot partition can be located on root partition


1) Change: rsync does not save xattrs any more.

2) Bugfix: dd backup cannot be restored because raspiBackup complaints about a missing .sfdisk file


1) Extension: Support for PARTUUID

2) Bugfix: If raspiBackup is active another instance will terminate immediately with an error message.

3) Bugfix: Restore initializes fake HW clock correctly

 5/17/2017  0.6.2

1) Bugfix: RBK0077E: Restore failed. Check previous error messages. RC: 109

2) Bugfix: Restorelogs are not truncated any more

3) Bugfix: Restore is possible again as it was in on a Linux not running on a Raspberry

4/8/2017 0.6.2

1) Enhancement: Support of Raspi3 if it's not using a SD any more (normal backup only - no partition oriented backup)

2) Bugfix: Partitionoriented mode will not save for tar backup the directories /tmp, /proc/ dev, etc any more

3) Bugfix: Partitionoriented mode will not save for rsync backup the directories /tmp, /proc/ dev, etc any more3) Enhancement: Partitionsoriented mode supports in addition to fat16/32 and ext234 also swap and btrfs partitions

4) Enhancement: Partitionoriented mode now supports to backup fat16/32, ext234 and swap and btrfs partitions

5) Enhancement: For Rsync backup it's tested whether hardlinks can be created.

6) Bugfix: Extension which are called when raspiBackup finished now get the return value from raspiBackup. Until now also a failure was reported as success.

7) New Option -M allows to define the name of the backup directory. That way it's possible to create a backup with a meaningful name. Useful when you want to create a quick backup in addition to the normal regular backup

8) Enhancement: Error messages and -handling was improved

9) Enhancement: raspiBackup cannot be started any more in parallel

10/8/2016 1) Bugfix: "RBK0027E: No external device mounted on /backup. SD card would be used for backup" is reported and the backup path passed as last parameter is not used.

1) Bugfix: Backup creation of .img and .mbr files is checked for successful completion. Otherwise backup terminates.

2) Improvement: Rootpartitionadaptation during  restor is done by Linux tools parted and no longer by a home grown algorithm

3) Bugfix: If a restore detects no partition on the target SD card there is a info message written instead of a cryptic error message create by the used tools parted


1) Improvement: If there are any runtime errors detected during raspiBackup startup these errors are reported via eMail if the eMailConfiguration is OK

2) Improvement: For dd backups only the space used by all defined partitions is saved. That way a 16GB SD card which uses only 4GB will be saved much faster and the backup image will be much smaller. Configurationvariable: DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY

3) Improvement: Boot partitionen backup will be saved by hardlinks if the backup space supports hardlinks so there exists only one boot partition backup if it's identidal to previous backups. That way 60MB per backup is saved on the backup partition. Configurationvariable: DEFAULT_LINK_BOOTPARTITIONFILES

4) Improvement: Optionparameters can be specified as text for options -l, -L and -m (e.g. -m detailed -L syslog -l debug)

5) Improvement:  Restore to any SD card (mmcblk0, mmcblk1, ...) is possible. Until now mmcblk0 was supported only.

6) Bugfix: Logfiles which are created in the backup directory will be saved in the home directory if the backup fails just before the incomplete backup directory is removed

7) Improvement: If there are any incompatible changes in a new version of raspiBackup this will be reported in a message.

8) Improvement: Errormessage of backuptools dd, tar and rsync are written in a message and are no longer visible only in the debug log

9) Bugfix: Option -u to exclude directories during backup creation didn't work since version any more.

10) Bugfix: Cleanup not executed at the end of restore

11) Bugfix: No error reported if restore failed

12) Improvement: If the restore SD card is either smaller or larger than the source SD card used for the backup the second partition is adapted accordingly. Works for tar and rsync backup in normal backup mode only.

13) Bugfix: Two error messages are not displayed

14) Parameters -a and -o are mandatory


1) Improvement: All backups are saved in dedicated subdirectories

2) Improvement: If raspiBackup fails the services stopped with -o will be started in any case

3) Improvement: -0 option forces during restore ignore of partition layout creation errors (Use with care!)

4) Improvement: -1 option does not create a partition layout during restore and restore uses the existing partition layout. (Use with care!)

5) Improvement: It's possible to configure to send a notification email only on failured

6) Improvement: Path- and filenames now can be relative

7) Improvement: Services will be started even a failure accoured (-a parameter argument)

8) Improvement: SSMTP eMail uses also -E argument

9) Deprecation: -p and -r parameters are deprecated and will be removed in a furure version. Pass the backupDirectory or backupFile as the last invocation parameter from now on

10) Improvement: rsync and tar tool invocationparameters can be modified (Use with care!)

11) Various minor enhancements

 Finally from a quality point of view there is another major improvement: The regessiontestsuite for raspiBackup now tests all possible 5 backup variations


1) Bugfix: Existing dd backups are deleted by tar or rsync backups if they are saved in the same backup directory

2) Improvement: raspiBackup will be updated immediately if there is a known serious bug in the current script version

12/26/15 1) Bugfix: Existing dd backups are deleted (introduced with
12/21/15 1) Bugfix: Old bootbackups are deleted when there don't exist corresponding rootbackups
12/15/15 1) Extension: Backward compatibility to version Restore of a pre backup uses the shared pre bootpartitionbackup for restore
12/10/15 1) Bugfix: rsync backup sometimes doesn't use hardlinks
12/3/15 1) Bugfix: If there is no bc installed an error message will be displayed

1) Bugfix: emailBody sometimes not displayed when using ssmtp

2) Bugfix: Backups of boot partitions with deleted root partition backups were not deleted

3) Enhancement: During restore it's no longer the absolut sd card size which is used to check whether the backup can be restored on a target sd card. The sum of all partition sizes is used instead.


1) Bugfix: ssmtp and sendEmail didn't work any more

2) Bugfix: force option used by sfdisk was removed in order to detect partitionioning errors


1) Improvement: Support for an eMailExtension to support other eMailClients

2) Improvement: Bootpartition data is saved for every backup run

11/11/15 0.6.1

1) Major improvement: More than two partitionen can be saved from the SD card. That way it's possible to save NOOBS images. (New parameter -P and -T).

2) Improvement: -V allows to restore versions updated with -U

3) Improvement: -y allows to quickly publish the current script version to a bunch of Raspberries

4) Improvement: Missing quotes in parameter arguments are detected and reported and no parameters are ignored any more

5) Directories and filenames can be relative. There is no need any more to use absolute names.

6) Not supported any more: xmbc Backup

7) Not supported any more: rsync backup only possible on ext3/ext4 formated partitions

8) Various minor improvements (Changed and new messages, message whether a config file is used,  much more log statements to improve debug capabilities, ...)


Small bugfixes and improvements:

1) Bugfix: File- and directorynames can have spaces

2) Improvement: Config parameters are checked for validity

3) Improvement: Script update check done only once a day

4) Bugfix: Parameter -G changes language used in eMail subject also

5) Improvement: Chek whether bash is used as interpreter

6) Improvement: Message tells whether a configuration file is used and which one


Small bugfixes and improvements:

1) Improvement: If there exist a new script vesrion the eMail will have a link to this version page so make the lookup of changes/new features more convenient

2) Bugfix: If a hostname uses a dash the restore doesn't work

3) Improvement: If it's not possible to write on the backup path (-p parameter) an error message is written

4) Improvement: /mnt and /media are now also saved

5) Improvement: It's now possible to keep up to 365 backups (Parameter -k)

6) Improvement: Select the message language if it should be different than the system language used on Raspi which is the default (new Parameter -G)

7) Bugfix:  -t rsync and -L 2 doesn't create a logfile

8) Improvement: Extensions get the returncode of the backup process as parameter

05/25/15 0.5.15

An extensions will be called by the script pre and post backup process. Two sample extensions  report the CPU temperature and the memory utilization. See


Backup of sd card with a boot partition only and an external root partition is now possible


Messageformat for the start/stop message was changed. In addition now an error in start/stop of services (-a/-o parameter) will terminate the script again. The doc was updated that && instead of ; has to be used as a separator in -a/-o parameters if multiple commands are used.


An update of the script will create a backup copy of the old file by using the version of the old script.

In addition error messages written if there are invalid invocation parameters used are now written in German and English depending on the locale used on the Pi


Additional parameterchecks were added

02/26/15 0.5.14

fdisk replaced with parted. Now there are no error messages written when a gpt instead of mbr is used.  Fixed some bugs in the restore messaging.

In addition a bug introduced in 0.5.12 is fixed, which caused the script update with parameter -U to fail.

02/24/15 0.5.13

/mnt is not used during restore any more. Restore on an empty SD Card works now. 

02/23/15 0.5.12

More backup progress messages are written when -m 1 is used. In addition some messages were rephrased

02/22/15 0.5.11

A notification will be generated if there exist a new script version (parameter -u)

02/22/15 0.5.10

Zip of tar and dd backups now has to be enabled with flag -z

02/20/15  0.5.9

Switched to GIT instead of CVS as code repository and the updatecheck -U doesn't download the actual script  any more and uses a dedicated version file to check.

That way the download counter of the script will not be modified any more if a check is executed


For coding commit details see coding change logs

The Raspberry Pi is a nice system which is used a lot of time to provide server services to be accessible from worldwide. That's Owncloud, a HTTP server, seafile or other services..

A VPN is the right way to access the server in a secure way. But if you want to give a lot of people access there is no way other than to allow access direct from the internet. Usually you use a DMZ for this but that's a feature a normal home router doesn't have. But now you should protect the Raspberry from internet access as far as you can and also protect your home network from access from the pi server when an intruder managed to get access to the pi. But note: If an the intruder managed to get root access then the iptables firewall can be turned off very quickly. So it's very important to get SW updates on a regular base.

Following article describes how to configure an iptables firewall to protect it from unauthorized access from the internet and to protect a local home network to be attacked from the server - just in case.

Owncloud has a very poor performance on Raspberry Pi. But seafile runs very fast if running on nginx. There exist already a lot of instructions how to install seafile on raspberry so you will find links to these website on the following page which I used to install seafile. In addition I wrote down the sequence of steps I executed. It's primaily a combination of the various installation instructions which I found. My config files of seafile running with nginx can be downloaded as sample config files for your convenience. In addition there is a startscript for /etc/init.d available which starts seafile all the time when Linux ist started and and stops it when it's shut down. 

Characteristics of the seafileserver: is used as external dns name, nginx (no apache), runs on secure https port and offers webdav services.

Raspberry Pi usually runs Linux (raspbian oder raspbmc). Linux allows to mount various external data sources. Following protocols are used commonly: SAMBA: smbfs/cifs, NFS: nfs, SSH: sshfs, FTP: cupsftp and Cloudspace: webdav/davfs. Following article explains with sample config files how to get access to these different datasourecs on the Raspberry Pi.

Raspberry Pi runs with Raspian, a Debian compiled for ARM architecture. Pi has an ethernet adapter and usually also an USB WLAN adapter is attached in order to be able to access Pi wireless. Given this hardware you can use the Raspberry Pi as an ethernet to WLAN bridge and/or as an access point with a cable connection. The following article explains how to create an ethernet to WLAN bridge on Debian and Raspberry Pi running Raspbian but will work also on other Linux distributions.
Raspberry Pi runs with Raspian, a Debian compiled for  ARM architecture. Pi has an ethernet adapter and usually a USB WLAN adapter is also attached in order to be able to have wireless access to Pi. Given this hardware you can use the Raspberry Pi as a  ethernet to WLAN bridge and/or as an access point with a cable connection. The following article explains ho to create a ethernet to WLAN bridge on Debian and Raspberry Pi running Raspbian.
Update March 1st, 2014: Until kernel 3.6.11+ everything works as described below. Starting with 3.10.25+ ist doesn't work any more and a router has to be configured.

A lot of people are interested in a Raspberry Pi and want to get some idea about the operating system running on Pi without the need to buy a Pi first. I actually searched for a convenient way to test a backup script called raspiBackup I wrote for the Raspberry Pi. A nice way to evaluate Raspbian or to run any tests is to use QEMU to emulate the Raspberry Pi. Note that special Pi hardware like GPIO et al cannot be simulated. It's just the processor which is simulated. You need a Raspbian Image and a system with Linux or Windows.  Today I configured my system to run a Pi in QEMU and the following article will explain step by step how I installed and configure QVM on my Debian based Linux. The image has a networking connection right after startup and will use the existing host network connection  with NAT. Finally a script is provided which executes the steps described and simplifies the image creation process.

With raspiBackup you can create regular backups of your Raspberry. In addition you can restore a backup to any SD card. A new partition table is created on the target SD card and the backup data is restored on the partitions. If an external root filesystem was saved with raspiBackup this filesystem will also be restored to an external device.

From time to time Raspberry Pi has networking issues. The following script analyzes Pi for common configuration errors and collects various network information, which provides a starting base for people who want to help to solve the issue, if the information is posted in a forum. Right now English and German are supported languages. If you want to help to get support for other  languages into the script just contact the script author (you find the eMail address at the beginning of the script header).

External IPs and MAC adresses together with SSIDs and wpa keys are masqueraded in the output.