SCB: Add Local Backup Target

This commit is contained in:
Dennis Reimann 2020-06-30 17:00:54 +02:00
parent 0da8991f51
commit 9d66626827
No known key found for this signature in database
GPG key ID: 5009E1797F03F8D0
2 changed files with 23 additions and 0 deletions

View file

@ -939,6 +939,14 @@ The script `/home/admin/config.scripts/internet.sshpubkey.sh` helps on init, sho
To test it - open or close a channel and check if you find a copy of `channel.backup` on your remote server. You can check the background-script logs to see details on errors: `sudo journalctl -f -u background`
#### C) Local Backup Target
*You can also backup the SCB to another local drive, e.g. an USB stick:*
In the `/mnt/hdd/raspiblitz.conf` the parameter `localBackupTarget='[DIRPATH-WITHOUT-ENDING-/]'` can be set to activate this feature.
To test it - open or close a channel and check if you find a copy of `channel.backup` in the specified location. You can check the background-script logs to see details on errors: `sudo journalctl -f -u background`
## Updating RaspiBlitz to new Version
If you have a RaspiBlitz v1.2 or higher - just follow the `UPDATE` option from the main menu (choose `RELEASE` if asked) and follow the instructions.

View file

@ -230,6 +230,21 @@ do
sudo cp $scbPath $localTimestampedPath
echo "OK channel.backup copied to '${localBackupPath}' and '{$localTimestampedPath}'"
# check if a local backup target is set
# parameter in raspiblitz.conf:
# localBackupTarget='[DIRPATH-WITHOUT-ENDING-/]'
if [ ${#localBackupTarget} -gt 0 ]; then
echo "--> Onsite-Backup SCP Server"
sudo cp ${localBackupPath} ${localBackupTarget}/
sudo cp ${localTimestampedPath} ${localBackupTarget}/
result=$?
if [ ${result} -eq 0 ]; then
echo "OK - Local Backup exited with 0"
else
echo "FAIL - Local Backup exited with ${result}"
fi
fi
# check if a SCP backup target is set
# parameter in raspiblitz.conf:
# scpBackupTarget='[USER]@[SERVER]:[DIRPATH-WITHOUT-ENDING-/]'