diff --git a/README.md b/README.md index b31c5650f..a330b4871 100644 --- a/README.md +++ b/README.md @@ -943,11 +943,9 @@ To test it - open or close a channel and check if you find a copy of `channel.ba *You can also backup the SCB to another local drive, e.g. an USB stick:* -You can use a small USB thumb drive (everything over 128MB is fine). Format it on your laptop as FAT32 (or ext4 if you have a linux laptop). Then plug it into a free USB port on your RaspiBlitz (use one of the USB 2 port - not the blue ones if possible). +You can use a small USB thumb drive (everything over 120MB is fine). Please dont use a second HDD/SSD for this because that might drain too much power and could hurt the security of your data more then it helps. -In the `/mnt/hdd/raspiblitz.conf` the parameter `localBackupDeviceUUID='[DEVICEUUID]'` can be set to activate this feature. - -The `DEVICEUUID` of your Thumbdrive you get when you see if you call on the terminal `lsblk -o NAME,SIZE,UUID` +To activate this feature go to MAINMENU > SETTINGS > 'StaticChannelBackup on USB Drive' and follow the instructions. 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` diff --git a/home.admin/00settingsMenuBasics.sh b/home.admin/00settingsMenuBasics.sh index 09b92a212..1f3b3dd16 100644 --- a/home.admin/00settingsMenuBasics.sh +++ b/home.admin/00settingsMenuBasics.sh @@ -21,6 +21,10 @@ echo "map dropboxbackup to on/off" DropboxBackup="off" if [ ${#dropboxBackupTarget} -gt 0 ]; then DropboxBackup="on"; fi +echo "map localbackup to on/off" +LocalBackup="off" +if [ ${#localBackupDeviceUUID} -gt 0 ] && [ "${localBackupDeviceUUID}" != "off" ]; then LocalBackup="on"; fi + echo "map zerotier to on/off" zerotierSwitch="off" if [ "${zerotier}" != "off" ]; then zerotierSwitch="on"; fi @@ -77,6 +81,7 @@ OPTIONS+=(n 'Testnet' ${chainValue}) OPTIONS+=(c 'Let`s Encrypt Client' ${letsencrypt}) OPTIONS+=(u 'LND Auto-Unlock' ${autoUnlock}) OPTIONS+=(d 'StaticChannelBackup on DropBox' ${DropboxBackup}) +OPTIONS+=(u 'StaticChannelBackup on USB Drive' ${LocalBackup}) OPTIONS+=(z 'ZeroTier' ${zerotierSwitch}) if [ ${#runBehindTor} -eq 0 ] || [ "${runBehindTor}" = "off" ]; then @@ -375,6 +380,17 @@ else echo "Dropbox backup setting unchanged." fi +# LocalBackup process choice +choice="off"; check=$(echo "${CHOICES}" | grep -c "u") +if [ ${check} -eq 1 ]; then choice="on"; fi +if [ "${LocalBackup}" != "${choice}" ]; then + echo "BackupdDevice Setting changed .." + anychange=1 + sudo /home/admin/config.scripts/blitz.backupdevice.sh ${choice} +else + echo "BackupdDevice setting unchanged." +fi + # Keysend process choice choice="off"; check=$(echo "${CHOICES}" | grep -c "k") if [ ${check} -eq 1 ]; then choice="on"; fi