New pages
Most visited
raspiBackup - Manual restore of a tgz backup
- Details
- Category: raspiBackup
- Hits: 55
The backup directory created by raspiBackup contains all information required to restore this backup also manually with standard Linux tools. The following page describes how to restore a normal tgz backup.
raspiBackup - Create regularly and unattended backups of your running Raspberries
- Details
- Category: raspiBackup
-
Also available:
- Hits: 180481
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
Raspberry Compute Module 4 (CM4) setup guide on eMMC and NVMe
- Details
- Category: Raspberry
- Hits: 3509
I recently got a compute module 4 (CM4) donated to add support for NVMe in raspiBackup (See here for details). I'm used to use a Raspberry but never used a CM4 before so I had to ramp up on CM4 first. The following page describes how I managed to get a RaspbianOS (Buster) up and running on the CM4 and to boot from NVMe.
My CM4 specs: 1GB main memory, 32GB eMMC and 128GB NVMe from Hynix, no WiFi and a Waveshare Mini Base Board A (CM4-IO-BASE-A)
Parts
Hynix NVMe, CM4 and Waveshare Mini Base Board A (from top to bottom)
Parts assembled
raspiBackup - FAQ
- Details
- Category: raspiBackup
-
Also available:
- Hits: 30543
Frequent asked questions about raspiBackup. Every new user of raspiBackup should read all questions and answers.
raspiBackup - Support for Raspberry Compute Module 4 and NVMe
- Details
- Category: raspiBackup
-
Also available:
- Hits: 2521
I just got a CM4 donated with 1GB main memory, 32GB eMMC and 128 GB NVMe. Thank you very much to the donator!
CM4 was already supported by raspiBackup but only running from a SD card, eMMC or USB boot. It's already possible to use NVMe when it's provided in an USB plug because it's exposed as a normal disk as /dev/sdx but there was no way to have NVMe plugged in in the PCI lane exposed as /dev/nvme. Now I fortunately was able to add this support to raspiBackup. This support is available now in release 0.6.8.
raspiBackup - Invocation syntax and options
- Details
- Category: raspiBackup
-
Also available:
- Hits: 541
Invocationsyntax and -options
raspiBackup has to be invoked as user root or with sudo. The invocation syntax is
raspiBackup.sh Option1 Option2 Option3 ... backupdirectory
raspiBackup Option1 Option2 Option3 ... backupdirectory
All default options can be overwritten in a configuration file /usr/local/etc/raspiBackup.conf. A sample configuration file which has the standard options defined can be downloaded here.
All options which turn something on or off can be controlled by a trailing + or -. Example: Option -z and option -z+ turn on the backupcompression. Option -z- turns off the backupcompression and ignores the definition DEFAULT_ZIP_BACKUP in the configuration file. That way it's possible to turn off options in the commandline even they are turned on in the configuration file.
In addition to /usr/local/etc/raspiBackup.conf other config files are read if they exist. They are included in following sequence and overide the previous option settings. Last but not least the invocation options overide all previously defined options in the configuration files.
Priority | Filename |
5 | /usr/local/etc/raspiBackup.conf |
4 | ~/.raspiBackup.conf |
3 | $(pwd)/.raspiBackup.conf |
2 | -f <configFile> |
1 | Invocation options |
Options theme sorted
- Options, which configure the backup
- Options, which configure the messages and logs
- Options, which configure the notification email
- Options, which update, restore and distribute raspiBackup
- Options, which start and stop services and run plugins before and after backup processing
- Miscellaneous options
Options alphabetical sorted
Parameter | Function | Default | Option can be set in installer | Option in configuration file |
-a |
Commands to start services stopped before the backup. Example "service xbmc start" (Attention: There are leading and trailing double quotes). This option is mandatory together with option -o. Multiple commands have to be separated by && . As an alternative use a wrapperscript (See below). The commands should have the inverse sequence as the commands used for the -o parameter. Example:
If there are no services to stop use a colon ":" as parameter. Note: All commands are executed as root. There is no sudo required. |
None | yes |
DEFAULT_STARTSERVICES |
-b | Blocksize used in the dd command | 1MB | no |
DEFAULT_DD_BLOCKSIZE |
-B |
Boot partition will be save with tar instead of dd Note: This option has no function if partition oriented mode is used and option -P is used or DEFAULT_PARTITIONBASED_BACKUP=1 is defined in the configuration file. |
No | no |
DEFAULT_TAR_BOOT_PARTITION_ENABLED |
--coloring | Starting with version 0.6.5 messages can be colorized. Possible parms C for console and/or M for eMail. See also option --eMailColoring if you use the postfix eMailClient. | CM | no |
DEFAULT_COLORING |
-D | Addition invocation parameters for dd command (e.G.. "conv=notrunc,noerror,sync") | None | no |
DEFAULT_DD_PARMS |
--dynamic Mount |
Starting with version 0.6.6 the specified mount point or partition will be mounted during startup and umounted at the end. If it's already mounted it's not umounted at the end. The mount point has to be defined in /etc/fstab. The option argument can either be the mount point (e.g. /backup) or the backup partition name (e.g. /dev/sdb1). | None | no |
DEFAULT_DYNAMIC_MOUNT |
-e | email address which will get a notification eMail | None | yes |
DEFAULT_EMAIL |
-E |
Optional additional parameters which are passed in the eMail call. For sendEmail use "-f sender.mail@senderdomain -s smtp-server:587 -xu username -xp password". Attention: The parameters for -E have to have a leading and trailing double quote ". It's useful to use parameter -F to speed up the test of the email notification function Attention: If option -l 1 is used the password will be logged in the log file. Masquerade the password before sending the log to somebody. |
None | no |
DEFAULT_EMAIL_PARMS |
Coloring |
Default is to use the subject header in eMails to control eMail coloring because that's the way used by most of the emailCients. If postfix is used then parameter OPTION has to be used because postfix uses a dedicated option to control email coloring. |
SUBJECT | no |
DEFAULT_EMAIL_COLORING |
-f | Configuration file which is includes last. See here for all configuration files and their precedence. | No | no | |
-F | Fake backup. This option is useful when raspiBackup is initially tested. The time consuming backup is not started but all the parameters are checked and an email is sent. | No | no | |
-g | This option enables a progress bar during backup and restore. For a tar backup there is no progress bar available. | no | ||
-G | Define language of messages. Possible messages are DE (German) and EN (English). Volunteers to translate the messages into another languages are welcome. Please contact me for details. |
System language If the system language is not supported EN (English) is used. |
yes |
DEFAULT_LANGUAGE |
-h | Help | No | no | |
--ignore Additional Partitions |
Starting with version 0.6.5 raspiBackup allows to have more than two partitions on the SD card when tar or rsync backup is used. But only the first two partitions, /boot and / are saved and restored. Attention: All other paritions are not saved. | No | no |
DEFAULT_IGNORE_ADDITIONAL_PARTITIONS |
-k |
Number of backups to keep for all backup types if not overridden by following option. If you use the default you keep 3 dd, 3 tar and 3 rsync backups. Note: This option is ignored when intelligent rotaion strategy is used. |
3 | yes |
DEFAULT_KEEPBACKUPS |
--keep_<type> |
Starting with version 0.6.4.3: Number of backups to keep for the specific backup type. <type> can be any backup type, eg dd, ddz, tar, tgz or rsync Note: These options are ignored when intelligent rotaion strategy is used. |
Parameter for option -k | no |
DEFAULT_KEEPBACKUPS_{DD|DDZ|TAR|TGZ|RSYNC} |
-l |
Log level defines whether a debug log will be created: - off -> No debug log - debug -> Create debug log Attention: Logfile may contain sensitive data in some situations (E.g. external static IP addresses, eMailAddresses, passwords for mount commands or eMail server ...). The debug logs are stored in the backup location. In case the backup fails and the backup directory will be cleaned up the debug log is saved in the home directory of the caller first. |
on | no |
DEFAULT_LOG_LEVEL |
-L |
Defines the log target for raspiBackup.log varlog: Target is /var/log/raspiBackup.log backup: Log will be stored in created backup current: Use current directory <filename>: Write log into <filename>. In addition the messages are written into a .msg file. |
backup | no |
DEFAULT_LOG_OUTPUT |
-m |
- minimal -> Write important messages only - detailed -> Write a lot of messages to show the progress |
minimal | yes |
DEFAULT_MSG_LEVEL |
-M |
This option allows to create raspiBackup snapshots which are not included in the backup recycle process. In addition the passed text is appended to the backup directory name. See also this page for details about snapshots. Note: raspiBackup snapshots are normal backups with special properties but no real snapshots like LVM or btrf snapshots Note: These backup directories are not included in the backup recycle process and have to be deleted manually. |
no | ||
-n | Notify if there is a newer version of raspiBackup available | Yes | no |
DEFAULT_NOTIFY_UPDATE |
-N | Activation of plugins to activate custom code. See this page for details which also offers three sample plugins which report the CPU temperature and the memory utilization before and after the backup run. | None | no |
DEFAULT_EXTENSIONS |
--notify Start |
Starting with version 0.6.5 it's possible to get an eMail or Telegram notification when raspiBackup starts. Default is to send an eMail or notification only when raspiBackup finishes. | No | no |
DEFAULT_NOTIFY_START |
-o |
Commands to stop services before the backup. Example "service smb stop" (Attention: There are leading and trailing double quotes). This option is mandatory together with option -a. Multiple commands have to be separated by && . As an alternative use a wrapperscript (See below). The commands should have the inverse sequences as the commands used for the -a parameter Example:
If there are no services to stop use a colon ":" as parameter. Note: All commands are executed as root. There is no sudo required. |
None | yes |
DEFAULT_STOPSERVICES |
-P | Enable partitionoriented mode which allows to save more than the first two partitions which are saved in the normal mode. Use parameter -T to define which partitions should be saved. | off | yes |
DEFAULT_PARTITIONBASED_BACKUP |
--reboot System |
Starting with release 0.6.7 this option initiates a reboot when the backup run finished. This way all services are restarted again. Arguments passed with option -a will be ignored because of this. Note: If option -F is used no reboot will be executed. |
off | no |
DEFAULT_REBOOT_SYSTEM |
-s |
email program to use to sent the notification eMail {mail|sendEmail|ssmtp|msmtp}. Use mail also for postfix and nullmailer and install mailtools. For sendEmail use also parameter -E to pass mandatory parameters (See parameter -E description for details) Other eMailClients can be used via an eMailPlugin Then mailext has to passed as the parameter. See this page for details about the eMailPlugin. |
no |
DEFAULT_MAILPROGRAM |
|
-S | An update with option -U is executed even the versions are identical. A local betaversion and a local normal version will be replaced with the latest code level. It's primarily used to update a local beta version to the latest code level. | off | no | |
--smart Recycle |
Starting with version 0.6.5 this option enables the intelligent rotationstrategy. For details see here. This also disables all --keep options and they don't have to be disabled by setting them to 0. | off | yes |
DEFAULT_SMART_RECYCLE |
--smart Recycle Dryrun |
Starting with version 0.6.5 this option enables or disables the test mode of the intelligent rotationstrategy on. For details see here. |
yes | no |
DEFAULT_SMART_RECYCLE_DRYRUN |
--smart Recycle Options |
Starting with version 0.6.5 this option defines the intelligent rotationstrategy parameters. For details see here. | "7 4 12 1" | yes |
DEFAULT_SMART_RECYCLE_OPTIONS |
--system status |
A list of running services and open files is reported in the debug logfile. | no | ||
-t |
Backup type which can be dd, tar or rsync. rsync uses hardlinks if the backupfilesystem is an ext3/ext4 partition Attention: rsync should not be used with NTFS formatted Backuppartitions because cannot store the access rights of an ext3/4 filesystem correctly. Therefore the access rights cannot be restored correctly on an ext3/4 filesystem and the restored image is unusable. In addition hardlinks are supported only on ext3/4 filesystems in order to minimze disk space usage. See details of the backuptypes. An external root filesystem will be saved if tar or rsync backup is used and option -P is not selected. Parameter -z can be used in addition to zip the backups to reduce the backup size. Note: dd backup can be controlled by configuration parameter DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY which saves backuptime and -space. For details of the parameter see bottom of table. |
dd | yes |
DEFAULT_BACKUPTYPE |
-T |
If the partitionoriented backupmode is selected with option -P this parameter can be used to define which partitions should be saved. Example: -T "1 2 5" saves the first two partitions and the fifth partition. * saves all partitions. |
* until release 0.6.5.1 "1 2" starting with release 0.6.6 |
yes |
DEFAULT_PARTITIONS_TO_BACKUP |
--telegram --telegram ChatID --telegram Notifications |
Starting with version 0.6.5 Telegram notifications are supported. You have to configure the token and chatid. Notifications option can be S for success and/or F for failure. With "M" raspiBackup messages are attached in a file.. With "m" raspiBackup messages are sent too. Any of these options can be combined. Example: "SFM" or "Sm". Options "M" and "m" cannot be used together. |
No
|
no |
DEFAULT_TELEGRAM_TOKEN DEFAULT_TELEGRAM_CHATID |
--timestamps | This option can be used to prefix all messages with a timestamp. | No | no |
DEFAULT_TIMESTAMPS |
-u |
Attention: Parameters have to follow the syntax of the backuptool used. Otherwise the backup will fail. Example for rsync or tar: "--exclude=/backup/* --exclude=/rsnapshot/* --exclude=/www-data*/*"
Note the enclosing double quotes! Additional information about the syntax is available on the man pages of the backup tools used. Following directories are not saved:
Backuppath used in invocation, /proc/* , /lost+found/* , /sys/* , /dev/* , /tmp/*, /boot/*, /run/* , /proc/* , /lost+found/* , /sys/* , /dev/* , /tmp/* , /boot/* , /run/*In addition all mounted directories from external devices which are not mounted on / are not saved. It's only the boot parition /dev/mmcblk0p1 and the root partition /dev/mmcblk0p2 or the external root filesystem on /dev/sda1 which is saved.
Note for partitionoriented backup mode:
If option -P is used the directories mentioned above are exluded in all partition backups.
rsync:
*/directory/* - Excludes directory on all partitions
mmcblk0p2/verzeichnis/* - Excludes directory on partition mmcblk0p2
tar:
directory/* - Excludes directory on all partitions
|
None | no |
DEFAULT_EXCLUDE_LIST |
--unsupported Environment |
Starting with release 0.6.7 this option allows to start raspiBackup also on unsupported environments. For details read this article. | off | no | |
-U |
Upgrades the current raspiBackup version with the latest available version. The previous one will be saved as raspiBackup.sh.n.m where n and m are the versionnumbers of raspiBackup. Attention: Read this page and understand which changes and new functions will become available before upgrading. See also option -S which forces an update with the latest version even the versions are identical. |
No | no | |
--updateUUIDs | Starting with release 0.6.4.4: A restore will create partitions with the same UUIDs and PARTUUIDs of the original system. This option will create new UUIDs and PARTUUIDs on the restored partitions. | No | no |
DEFAULT_UPDATE_UUIDS |
-v | Verbose mode of the backup tools tar and rsync. This option is useful during initial manual backup tests in order to see the backup progress. | No | no |
DEFAULT_VERBOSE |
-V | Presents a list of existing previous version and allows to select one of the version to restore. The actual version will be saved and can be restored later on. See also parameter -U. (Available with Release 0.6) | No | no | |
--version |
Display the version information of raspiBackup in following format: Version: 0.6.3.2 CommitSHA: 8fbcd1a CommitDate: 2018-02-19 CommitTime: 19:18:31 That way it's possible to query the current version information in a programmatic way. |
No | no | |
-y | This option starts the deployment of the actual script to hosts which are defined in the configuration file. Access has to be possible without password and requires the keys to be copied into authorized_keys . That way you can quickly deploy a new script version on multiple hosts. | No | no |
DEFAULT_DEPLOYMENT_HOSTS |
-z | Use gzip with dd or tar backup to reduce the backup size | No | yes |
DEFAULT_ZIP_BACKUP |
An eMail will be sent only in case of backup failure Note: If raspiBackup crashes because of unexpected reasons it may happen there is no eMail send even the backup failed. You use this option on your own risk. |
No | no |
DEFAULT_MAIL_ON_ERROR_ONLY |
|
Backupoptions used by rsync backup. You use this option on your own risk. |
--delete -aHAx | no |
DEFAULT_RSYNC_BACKUP_OPTIONS |
|
Backupoptions used by tarbackup. You use this option on your own risk. | -cpi | no |
DEFAULT_TAR_BACKUP_OPTIONS |
|
Additional backupoptions used by rsync backup. You use this option on your own risk. |
no |
DEFAULT_RSYNC_BACKUP_ADDITIONAL_OPTIONS |
||
Additional backupoptions used by rsync backup. You use this option on your own risk. |
no |
DEFAULT_TAR_BACKUP_ADDITIONAL_OPTIONS |
||
Bootpartition backups use hardlinks to minimze the backupspace because bootpartitions don't change often. Note: Ssupport of hardlinks on the backupspace required (ext3/ext4 filesystem) | No | no |
DEFAULT_LINK_ BOOTPARTITIONFILES |
|
dd backup only saves the space used by defined partitions. That way a backup of a 32 GB SD card with a 8GB partition only needs 8GB. The root partition in general uses the the whole SD card and has to be resized with gparted or resize2fs first appropriately. See also FAQ#16 |
No | no |
DEFAULT_DD_BACKUP_SAVE_USED_PARTITIONS_ONLY |
|
This option is used to append the log to the eMail | -a | no |
DEFAULT_APPEND_LOG_OPTION |
|
Define the sender eMail for ssmtp and msmtp. | root@$(hostname) | no |
DEFAULT_SENDER_EMAIL |
|
Backup restore test reminder Intervall (Unit: Months) |
6 | no |
DEFAULT_RESTORE_REMINDER_INTERVAL |
|
Number of reminders to execute a backup restore test | 3 | no |
DEFAULT_RESTORE_REMINDER_REPEAT |
|
Starting with version 0.6.4.3: Defined commands are executes before and after backup creation and before stopping and after starting system services (options -a and -o) | No | no |
DEFAULT_BEFORE_STOPSERVICES DEFAULT_AFTER_STARTSERVICES |
|
Starting with version 0.6.7 you can define a pre and post exit which is executed when a backup is restored. The syntax is identical to the extsion format for backups. | Empty | no |
DEFAULT_RESTORE_EXTENSIONS |
|
Starting with version 0.6.7 you can redefine the color codes used for emails and console. The first pair defines the colors for warnings and the second pair the colors for errors. The first element of the pair is the HTML color code The second element defined the VT100 color code. | ("#FF8000 33" "#FF0000 31") |
no |
DEFAULT_RESTORE_EXTENSIONS |
|
Starting with version 0.6.8 you can sent notifications to pushover. You have to register on https://pushover.net/ first and have to create an application. PUSHOVER_USER is the Pushover User Key. PUSHOVER_TOKEN is the API Token Key for you application. Notifications option can be S for success and/or F for failure. With "M" raspiBackup messages are attached in a file.. With "m" raspiBackup messages are sent too. Any of these options can be combined. Example: "SFM" or "S"F. Priorities are the Pushover priorities. Sounds are the Pushover sounds. |
no |
DEFAULT_PUSHOVER_TOKEN DEFAULT_PUSHOVER_USER DEFAULT_PUSHOVER_NOTIFICATIONS DEFAULT_PUSHOVER_SOUND_SUCCESS DEFAULT_PUSHOVER_SOUND_FAILURE DEFAULT_PUSHOVER_PRIORITY_SUCCESS DEFAULT_PUSHOVER_PRIORITY_FAILURE |
||
Starting with version 0.6.8 you can sent notifications to slack. Notifications option can be S for success and/or F for failure. With "M" raspiBackup messages are attached in a file.. With "m" raspiBackup messages are sent too. Any of these options can be combined. Example: "SFM" or "S"F. |
no | DEFAULT_SLACK_WEBHOOK_URL DEFAULT_SLACK_NOTIFICATIONS |
raspiBackup - Supported hardware and software
- Details
- Category: raspiBackup
-
Also available:
- Hits: 2651
raspiBackup - Supported hardware and software
raspiBackup is supported with RaspbianOS and Raspberry hardware only. Ubuntu on Raspberry will be supported in next release. There is a beta available already. But raspiBackup 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. Given the fact raspiBackup is maintained and supported for free
1) It's too expensive for me to buy all possible hardware required for tests
2) it's too expensive for me to setup and execute all test combinations
3) it's to expensive for me to execute all tests every time a new release will be published.
There exists a small script in github which tests whether the present environment is supported by raspiBackup. (see here)
raspiBackup - How to restore your backup
- Details
- Category: raspiBackup
-
Also available:
- Hits: 30077
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!
How to test the CPU temperature of my Raspberry and check whether the CPU speed was throttled ?
- Details
- Category: Raspberry
-
Also available:
- Hits: 3694
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 - Used all over the world
- Details
- Category: raspiBackup
-
Also available:
- Hits: 3937
raspiBackup is used in a lot of countries all over the world (as of 08/2022)
Countries: 63
AE United Arab Emirates
AL Albania
AR Argentina
AT Austria
AU Australia
BA Bosnia and Herzegovina
BE Belgium
BG Bulgaria
BN Brunei
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
GH Ghana
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
LB Lebanon
LT Lithuania
LU Luxemburg
MD Moldovia
MT Malta
MX Mexico
MY Malaysia
NL Netherlands
NO Norway
NZ New Zealand
PA Panama
PL Poland
PT Portugal
RO Romania
RS Serbia
RU Russia Any access rejected since 2/24/2022
SE Sweden
SG Singapore
SI Slovenia
SK Slovakia
TH Thailand
TR Turkey
TW Taiwan
UA Ukraine
US United States of Amerika
ZA Zaire
raspiBackup - Use pishrink to reduce dd backups to a minimum size
- Details
- Category: raspiBackup
-
Also available:
- Hits: 6427
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.
raspiBackup - How do hardlinks work with rsync
- Details
- Category: raspiBackup
-
Also available:
- Hits: 4975
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: 3425
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 a configuration update.
Note
If a version less than 0.6.5 is upgraded the configuration file merge has to be started 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.
Page 1 of 2