mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-22 22:25:46 +01:00
SCB: Add Local Backup Target
This commit is contained in:
parent
0da8991f51
commit
9d66626827
2 changed files with 23 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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-/]'
|
||||
|
|
Loading…
Add table
Reference in a new issue