New pages
- raspiBackup - Supported hard- and software
- How to backup ACLs with rsync on a nfs mounted partition?
- raspiBackup - Local language support for languages other than DE and EN (L10N)
- bash - Nice way to enhance and prettify execution trace enabled with -x
- Unable to retrieve sensor data from DHT22 with ESP8266
- raspiBackup - How to restore single files or directories from the backup
- raspiBackup - How can I install and test the Beta version?
Most visited
raspiBackup - Create regularly an unattended backup of your running Raspberries
- Details
- Category: raspiBackup
-
Also available:
- Hits: 163790
raspiBackup helps to create backups of a running Raspberry with no shutdown or manual intervention which means your can save or clone your SD card during normal operation. An exported root partition will be saved too. Important services will be stopped just before starting the backup and are started again when the backup finished. Any device which can be mounted on Linux can be used as backupspace (USB disk, USB stick, nfs, samba, sshfs, ...). The backup image can be created with dd, tar or rsync using hardlinks. Restore is possible on Windows or Linux. Source Raspbian may have been installed on SD card only or the boot partition may be on SD card and the root partition on an external USB device like USB SSD or USB stick. Raspbian installed on an USB device only using USB boot mode is also supported
raspiBackup - FAQ
- Details
- Category: raspiBackup
-
Also available:
- Hits: 26949
Frequent asked questions about raspiBackup. Every new user of raspiBackup should read all questions and answers.
raspiBackup - How do hardlinks work with rsync
- Details
- Category: raspiBackup
-
Also available:
- Hits: 3219
A lot of time people ask how rsync backup type works and how hardlinks are used. Following article describes when files are created and deleted on the file system Dateien and when hardlinks are used.
raspiBackup - Configuration update when upgrading to a new version
- Details
- Category: raspiBackup
-
Also available:
- Hits: 2267
Whenever an upgrade to a new version of raspiBackup is executed it's tested whether the new version has new configuration options. If there are new configuration options used the local configuration file will be merged into a new file with the new configuration file while upgrading raspiBackup. Following page describes in detail what's going on during configuration update.
Note
If a version less than 0.6.5 is upgraded the configuration file merge has to be starten manually after upgrading. Following command will start the configuration update:
sudo raspiBackup.sh --updateConfig
When the two configuration files are merged raspiBackup writes various information messages. Following messages are written when upgrading raspiBackup from v0.6.4.3 to v0.6.5:
--- RBK0241I: Merging current configuration v0.1.3 with new configuration v0.1.4 into /usr/local/etc/raspiBackup.conf.merged.
--- RBK0248I: Added option DEFAULT_SMART_RECYCLE=0.
--- RBK0248I: Added option DEFAULT_SMART_RECYCLE_DRYRUN=1.
--- RBK0248I: Added option DEFAULT_SMART_RECYCLE_OPTIONS="7 4 12 1".
--- RBK0248I: Added option DEFAULT_TELEGRAM_TOKEN="".
--- RBK0248I: Added option DEFAULT_TELEGRAM_CHATID="".
--- RBK0248I: Added option DEFAULT_TELEGRAM_NOTIFICATIONS="F".
--- RBK0248I: Added option DEFAULT_NOTIFY_START=0.
--- RBK0248I: Added option DEFAULT_COLORING="CM".
--- RBK0243I: Configuration merge finished successfullly but not activated.
!!! RBK0245W: Backup current configuration in /usr/local/etc/raspiBackup.conf.bak and activate updated configuration? y/N
Configuration file
/usr/local/etc/raspiBackup.conf.merged
will be created and receive the merged configuration files /usr/local/etc/raspiBackup.conf with the new configuration . RBK248 lists which changes are applied. Finally you have to answer the question whether you want to activate the merged configuration file. The existing configuration file will be saved in /usr/local/etc/raspiBackup.conf.bak. Do you answer with yes the configuration update is finished and you get following messages
--- RBK0240I: Saving current configuration /usr/local/etc/raspiBackup.conf to /usr/local/etc/raspiBackup.conf.bak.
--- RBK0244I: Merged configuration /usr/local/etc/raspiBackup.conf.merged copied to /usr/local/etc/raspiBackup.conf and activated.
That's the easiest way to activate the merged configuration file and you're done quickly.
But you also can answer no and the merged configuration file will not be activated. You get following message:
--- RBK0247I: Now review /usr/local/etc/raspiBackup.conf.merged and copy the configuration file to /usr/local/etc/raspiBackup.conf to finish the configuration update.
The new options in the merged configuration file can easily be identified:
# Smart recycle
# >>>>> NEW OPTION added in config version "0.1.4" <<<<<
DEFAULT_SMART_RECYCLE=0
# Smart recycle dryrun
# >>>>> NEW OPTION added in config version "0.1.4" <<<<<
DEFAULT_SMART_RECYCLE_DRYRUN=1
# Smart recycle parameters (daily, weekly, monthly and yearly)
# >>>>> NEW OPTION added in config version "0.1.4" <<<<<
DEFAULT_SMART_RECYCLE_OPTIONS="7 4 12 1"
Now use your editor and check /usr/local/etc/raspiBackup.conf.merged and change the contents if needed. Finally copy the merged configuration file to /usr/local/etc/raspiBackup.conf to activate the new configuration file.
Finally execute as usual whenever you upgraded raspiBackup a backup/restore cycle and test whether everything still works as before.
raspiBackup supports usage of different configuration files. The automatic configuration update is only done for /usr/local/etc/raspiBackup.conf. All other configuration files have to be updated manually. Just copy the lines marked as new configuration lines into the other configuration files.
raspiBackup - Use pishrink to reduce dd backups to a minimum size
- Details
- Category: raspiBackup
-
Also available:
- Hits: 4987
pishrink is a useful tool to reduce the size of dd images to it's minimum. When the image is booted the image expands the root partition to it's possible maximum size. You can shrink an image created by raspiBackup by using the helper script raspiBackupWrapper.sh. Following paragraph describes in detail how to configure raspiBackup to shrink dd backup images with pishrink.
How to test the CPU temperature of my Raspberry and check whether the CPU speed was throttled ?
- Details
- Category: Raspberry
-
Also available:
- Hits: 2770
We now have a new Raspberry4 gibt, which in contrast to the previous versions becomes quite hot. So everybody is interested in the effectiveness of either passive or active cooling and whether this cooling suppresses CPU throtteling.
I wrote a small script check_throttled.sh which reads the current throttling states of the Raspberry with vcgencmd get_throttled
and if throtteling happens or already happend the meaning of the throttling bits is reported.
raspiBackup - How to restore your backup
- Details
- Category: raspiBackup
-
Also available:
- Hits: 26395
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.
Recently I got issues in github because restore failed. It's strictly recommended to restore your backup with the same OS the backup was created with. You're free to use another Linux release but this may the restore to fail because of different versions of the Linux tools which are usedto backup and restore the backup. In particular it's because of an incompatible change in sfdisk in Bullseye. Just use the OS the backup was created to restore the backup!
raspiBackup - Used all over the world
- Details
- Category: raspiBackup
-
Also available:
- Hits: 2980
raspiBackup is used in a lot of countries all over the world (as of 01/2022)
Countries: 61
AE United Arab Emirates
AR Argentina
AT Austria
AU Australia
BA Bosnia and Herzegovina
BE Belgium
BG Bulgaria
BR Brasila
CA Canada
CH Suisse
CL Chile
CN China
CY Cyprus
CZ Czech Republic
DE Germany
DK Denmark
DZ Algeria
EE Estonia
ES Spain
EU Europe
FI Finland
FR France
GB United Kingdom
GR Greece
HK Honkong
HR Croatia
HU Hungury
ID Indonesia
IE Irland
IL Israel
IN India
IR Iran
IT Italy
JP Japan
KR South Corea
LU Luxemburg
MD Moldovia
MT Malta
MX Mexico
NL Netherlands
NO Norway
NZ New Zealand
PA Panama
PL Poland
PT Portugal
RO Romania
RS Serbia
RU Russia
SE Sweden
SG Singapore
SI Slovenia
SK Slovakia
TH Thailand
TR Turkey
TW Taiwan
UA Ukraine
US United States of Amerika
ZA Zaire
raspiBackup - Supported hard- and software
- Details
- Category: raspiBackup
-
Also available:
- Hits: 725
raspiBackup is supported with RaspbianOS and Raspberry hardware only. But raspiBackup kann can also be used successfully on different hardware with different Linux distributions Just test raspiBackup on your environment and be happy if it works. But if it fails or you get error messages there is no support. It's too expensive for me to buy all possible hardware required for tests and to setup and execute all test combinations and finally execute all tests every time a new release will be published.
bash - Nice way to enhance and prettify execution trace enabled with -x
- Details
- Category: Programming
- Hits: 1560
I just stumbled upon a nice way to enhance the bash debug trace output format (See here for the source).
Just declare
declare -r PS4='|${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
and you will get following output
framp@obelix:~/scripts$ bash -x ./dbg.sh 3
+ declare -r 'PS4=|${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
|16> main(): fib 3
|6> fib(): (( 3 <= 0 ))
|8> fib(): (( 3 == 1 ))
||11> fib(): fib 1
||6> fib(): (( 1 <= 0 ))
||8> fib(): (( 1 == 1 ))
||9> fib(): echo 1
||11> fib(): fib 2
||6> fib(): (( 2 <= 0 ))
||8> fib(): (( 2 == 1 ))
|||11> fib(): fib 0
|||6> fib(): (( 0 <= 0 ))
|||7> fib(): echo 0
|||11> fib(): fib 1
|||6> fib(): (( 1 <= 0 ))
|||8> fib(): (( 1 == 1 ))
|||9> fib(): echo 1
||11> fib(): echo 1
|11> fib(): echo 2
2
when you execute following code to calculate the Fibonacci numbers:
1: #!/bin/bash
3: declare -r PS4='|${LINENO}> \011${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
5: function fib(){
6: if (( $1 <= 0 )); then
7: echo 0
8: elif (( $1 == 1 )); then
9: echo 1
10: else
11: echo $[ $(fib $(($1-2)) ) + $(fib $(($1 - 1)) ) ]
12: fi
14: }
16: fib $1
Erfahrungen beim Umzug von Fritz!Box 7390 zu Fritz!Box 7590
- Details
- Category: Networking
- Hits: 4274
Meine Fritz!Box 7390 hat viele Jahre dafür gesorgt dass ich einen zuverlässigen Zugriff von Zuhause ins Internet hatte. Machmal gab es Anschlussprobleme die aber nicht der Fritz!Box anzulasten waren sondern der Vermittlungsanlage sowie Infrastrukturprobleme meine Internetproviders 1und1.
Vor ca 1 Monat wurde mein Anschluss in der Vermittlungsanlage von 50Mb auf 100Mb umgestellt und meine Fritz!Box7390 fing danach intermittierend an in einer Woche 1-3 Mal die DSL Synchronisation zu verlieren obwohl die vertraglich vereinbarte Geschwindigkeit weiterhin bei 50Mb blieb. Ich muss aber dazu sagen dass der Download danach von 47Mb auf 51Mb sowie der Download von 9Mb auf 11Mb gestiegen ist. Anyhow ist die Fritz!Box 7390 offensichtlich ein wenig am ächzen bei der neuen Anbindung. Da die Fritz!Box 7390 keine Softwareupdates bekommt - und speziell keine sicherheitsrelevanten Softwareupdates - war beides zusammen für mich der Anlass mir eine Fritz!Box 7590 zu kaufen umd damit die gute alte Fritz!Box 7390 zu ersetzen.
Protect Raspberry Pi against internet attacks and disable attacks into the local network with a firewall using iptables
- Details
- Category: Raspberry
-
Also available:
- Hits: 10203
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.