From b6840b9509b0a845d3ca8dac44e852eea3904a16 Mon Sep 17 00:00:00 2001 From: Juraj Bednar Date: Tue, 23 Jul 2019 09:35:52 +0200 Subject: [PATCH] Refine backup script (#175) * Add litecoin datadir to exclude If you are running a litecoin node, litecoin datadir does not need to be included. It is only exclude, so no error in case of pure bitcoin install. * Add huge fat warning to the backup script If someone is looking around and trying to find a good backup solution, make sure they know the limitations --- backup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backup.sh b/backup.sh index 1df5512..c5d8ef2 100755 --- a/backup.sh +++ b/backup.sh @@ -1,5 +1,15 @@ #!/bin/bash +# This script might look like a good idea. Please be aware of these important issues: +# +# - The backup file is not encrypted and it contains your lightning private keys. +# Consider encrypting before uploading or using another backup tool like duplicity. +# - Old channel state is toxic and you can loose all your funds, if you or someone +# else closes a channel based on the backup with old state - and the state changes +# often! If you publish an old state (say from yesterday's backup) on chain, you +# WILL LOSE ALL YOUR FUNDS IN A CHANNEL, because the counterparty will publish a +# revocation key! + if [ "$(id -u)" != "0" ]; then echo "This script must be run as root." echo "Use the command 'sudo su -' (include the trailing hypen) and try again"