btcpayserver / btcpayserver-docker

Docker resources for hosting BTCPayServer easily
MIT License
562 stars 347 forks source link

Migration of LND to seed backup does not work #272

Closed hubiktomas closed 3 years ago

hubiktomas commented 4 years ago

Hello, I have tried to migrate my LND to seed backup. I am running BTCPayServer 1.0.3.161 deployed to Azure using the wizard about 2 years ago and just updating regularly since then. I have successfully closed all channels, waited for settlement, then run the command from the migration guide. Everything went smoothly, just the seed backup is not there - the instance is still telling me that the LND does not support seed backup and that I have to migrate. I tried to run the command 3 times including some reboots in between. Here is the output of the command:

root@BTCPayServerVM:/var/lib/waagent/custom-script/download/0/btcpayserver-docke                                                                                                                                                                                               r/Tools# ./recreate_bitcoin_lnd.sh
This script will delete and recreate your LND Bitcoin container. YOU CAN'T UNDO                                                                                                                                                                                                THIS OPERATION, ALL FUNDS THAT YOU CURRENTLY HAVE ON THIS LND WILL BE LOST! Type                                                                                                                                                                                                'yes' to proceed only after you've transfered all your funds from this LND inst                                                                                                                                                                                               ance
> yes
Only proceed if you've removed all the funds from LND Bitcoin container! This LN                                                                                                                                                                                               D instance will be completely deleted and all data from it unrecoverable. Type '                                                                                                                                                                                               yes' to proceed only if you are 100% sure
> yes
OK, last chance to abort. Type 'yes' to continue!
> yes
Stops containers and removes containers, networks, volumes, and images
created by `up`.

By default, the only things removed are:

- Containers for services defined in the Compose file
- Networks defined in the `networks` section of the Compose file
- The default network, if one is used

Networks and volumes defined as `external` are never removed.

Usage: down [options]

Options:
    --rmi type          Remove images. Type must be one of:
                        'all': Remove all images used by any service.
                        'local': Remove only images that don't have a custom tag
                        set by the `image` field.
    -v, --volumes       Remove named volumes declared in the `volumes` section
                        of the Compose file and anonymous volumes
                        attached to containers.
    --remove-orphans    Remove containers for services not defined in the
                        Compose file
Stopping letsencrypt-nginx-proxy-companion ... done
Stopping nginx-gen                         ... done
Stopping production_btcpayserver_1         ... done
Stopping nginx                             ... done
Stopping btcpayserver_lnd_bitcoin          ... done
Stopping btcpayserver_lnd_litecoin         ... done
Stopping btcpayserver_bitcoind             ... done
Stopping tor-gen                           ... done
Stopping btcpayserver_monero_wallet        ... done
Stopping production_nbxplorer_1            ... done
Stopping production_bitcoin_rtl_1          ... done
Stopping btcpayserver_litecoind            ... done
Stopping production_postgres_1             ... done
Stopping btcpayserver_monerod              ... done
Stopping tor                               ... done
Removing letsencrypt-nginx-proxy-companion ... done
Removing nginx-gen                         ... done
Removing production_btcpayserver_1         ... done
Removing nginx                             ... done
Removing btcpayserver_lnd_bitcoin          ... done
Removing btcpayserver_lnd_litecoin         ... done
Removing btcpayserver_bitcoind             ... done
Removing tor-gen                           ... done
Removing btcpayserver_monero_wallet        ... done
Removing production_nbxplorer_1            ... done
Removing production_bitcoin_rtl_1          ... done
Removing btcpayserver_litecoind            ... done
Removing production_postgres_1             ... done
Removing btcpayserver_monerod              ... done
Removing tor                               ... done
Removing network production_default
generated_lnd_bitcoin_datadir
Creating network "production_default" with the default driver
Creating production_postgres_1 ...
Creating tor ...
Creating btcpayserver_monerod ...
Creating production_postgres_1
Creating btcpayserver_litecoind ...
Creating production_nbxplorer_1 ...
Creating production_bitcoin_rtl_1 ...
Creating btcpayserver_monerod
Creating tor
Creating btcpayserver_litecoind
Creating production_nbxplorer_1
Creating btcpayserver_monerod ... done
Creating btcpayserver_monero_wallet ...
Creating tor ... done
Creating btcpayserver_lnd_litecoin ...
Creating btcpayserver_bitcoind ...
Creating tor-gen ...
Creating btcpayserver_lnd_litecoin
Creating tor-gen
Creating btcpayserver_bitcoind ... done
Creating btcpayserver_lnd_bitcoin ...
Creating btcpayserver_lnd_bitcoin ... done
Creating nginx ...
Creating production_btcpayserver_1 ...
Creating nginx
Creating nginx ... done
Creating nginx-gen ...
Creating nginx-gen ... done
Creating letsencrypt-nginx-proxy-companion ...
Creating letsencrypt-nginx-proxy-companion ... done
LND container recreated
NicolasDorier commented 4 years ago

Can you update docker-compose ? this should do the trick.

hubiktomas commented 4 years ago

You mean like the package or config? I am updating my packages regularly, but I have not used dist upgrade since I am not sure about the compatibility and what it will break. :)

NicolasDorier commented 4 years ago

I mean docker-compose itself.

NicolasDorier commented 4 years ago

see https://stackoverflow.com/questions/49839028/how-to-upgrade-docker-compose-to-latest-version

hubiktomas commented 4 years ago

I have done that, but it does not seem to help. I am running docker-compose version 1.25.4, build 8d51620a.

hubiktomas commented 4 years ago

Maybe the problem is in name of the volume in the script. See the volumes below:

root@BTCPayServerVM:/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Tools# docker volume ls
DRIVER              VOLUME NAME
local               2d36ac473f4b7456ad21f834344796988d349d94e13771a0d8708f019862d34e
local               3c25a6f22b3e0f9a6ac43d55d113e1fa53b32f4310c1f82096af5f7928056472
local               3effac35aac4dc9a9e1f6348b1c37a22ea8f8a24d08d17133ab8e37e3fa76f83
local               3fe1267a5b86cddad9b902742eddc97a7c3d8dcbf0aa3431eae89169ccc9b83a
local               5f7ae81a1e3c3cdd198a5a48c23827f9cac28213622832a5afc3f040879a5c64
local               7a1df9b58b40b410abbc7320b5ba13a9f430737f6d657be89a73586319dfcf5d
local               7dde42e4485332daa7f790e7a5c9d42863b2cf79616556a26cbfd019f0084a11
local               8b7544fd24740e85398362eecc9101b8aeadbeacf9d1af23d8bf55374a77001c
local               8cc5980d18c7fe18ea939690f5af92d2a39b0bb8f3550637c0e2ade1e9405477
local               8d06acd3e8d387a738282e4da2be5800e29aba82479de3f12d4a073181baffe8
local               21fa5b39d0495a4dc6c7ab407083e8795a87172653f668e4b4850dd365893890
local               23ba14c3c8c371e60425efbdcad3137354544e50f317d5d4d98768d75df6b09c
local               36b444d5a3e703d3a953f259eac3f4f30bf5fb218b0607500d4e7417c2e83fb9
local               57f8aef6b0ed3b6025553b84dca118dfc86264f49e653f0a6c70548cb4ee69bd
local               77c57ba424ba88524b48e8a384dc213e3716e3724ca22e3c815d17c923c0d1d4
local               82e5d0a4e8d8900d4eb6c06e63f9dc8ae35eeeefa1d7ece71fb4d55677c7f388
local               83b213e2907e88de099b018f0e8d473669cb6c34c372c91346f6553293f2a7a2
local               140b33dbf36c87c2ef3ca1e5f193920bc26628b1d918bbe0de08025e405f1fe7
local               0620cc270a4ce925e44c1fbe25f3b26486db50e03c70ff92db02b75d2c08e0ca
local               5234cb52faafa7df2973a60671d352650ed2cb2ea4741cf99c9e751aefbf2274
local               8186c38277fed1394468af42a57d535b3cb64dc5330546af7c7829f087322fdf
local               21062c6f67e54379e3ce8609786f4cd47e88d6d6f29e4ec0f994c77b6c710c36
local               460820a31882345e16d16f1073b40c9c8c4f1c4408f7b37a54c5ef6decf3e0bb
local               953138e6b7fcf00cb760d0a097679371e30a93bfe888e175a1eefbd2499edd1f
local               1245130f4b0e8aa26eb3f0e4f801778f963276867213183048b53aec29feece0
local               4850200883ce6adb0709962410dedf6db99a9162d19191f086b7db1c7c8709d5
local               a8c04f01219cb6f6596b7cb20ee32da42cc92a08db2e04de12cbdc83554f6c3e
local               a16e3c6a563513903d2ba7f7ea220b2d379f148bd6f64473119bcad12393800d
local               a2572223f1355feb3581f4cb0bb355a8f8825bed6d9799f6a6e6a889b29f2631
local               ace75027a841e85a442676074773ec1a14d1bf3d62958938a1c8c7e090da32d9
local               b0e948388b5659535a65a4358d125fa4c3ad67dfe15038f86efbeb89cd6fc027
local               b7817f5dd0999359d53eb5a0cacbc005682563dd29009b25d3b0800326b2ae29
local               bba80b230d456eab23cd6ead6ced96425e0ed442212b41b60a86ba45d3a8ace9
local               bbcf4476b3f76d541c748227eccb749a6d42f8a84ce2a25d35c0029ad8f1fb8e
local               bf9c9f5583fd8706d79a675a5eacab61fcd58c1893fd996124785390445b494a
local               c1c731907afb3aab31293177dead93b899b53b566cc3ec23687a64226081697f
local               c06fed7e7a50b763851f58955e729e2133cfb5fe9207baec2bfc805bf02611c1
local               c471e3a8206e2c081429a331ed58a7361c9776fe42292cbb53347136bb717913
local               dacc03f3991e66787bd16522218f1504777291da5b349c1b06398f78c22e3db2
local               e914cef4b44335bc20165f7a8bbcd077d83f8856a6824ceac17c50b6431029a8
local               ef5c4c8ffd22866ffde91758125258f011e4b2952b5686f2a637597804b32756
local               fc4f6fa9a2903eb8e6c2d8d653d71b9466fecb219c5f78e598dbdf49dae7e209
local               fe5ee78e3104ef39792a8d7e68289173b523ba076a94b45c788e9dc63441b412
local               fff97747746d378f1d0d73f909a1d54e1c4ea91cfea42f29f6487b1c2d7c879e
local               production_bitcoin_datadir
local               production_bitcoin_wallet_datadir
local               production_btcpay_datadir
local               production_clightning_bitcoin_datadir
local               production_clightning_litecoin_datadir
local               production_litecoin_datadir
local               production_lnd_bitcoin_datadir
local               production_lnd_bitcoin_rtl_datadir
local               production_lnd_litecoin_datadir
local               production_nbxplorer_datadir
local               production_nginx_certs
local               production_nginx_conf
local               production_nginx_html
local               production_nginx_vhost
local               production_postgres_datadir
local               production_tor_datadir
local               production_tor_servicesdir
local               production_tor_torrcdir
local               production_xmr_data
local               production_xmr_wallet

And the script is trying to delete volume generated_lnd_bitcoin_datadir, which does not exist. Should I remove the production_lnd_bitcoin_datadir?

Kukks commented 4 years ago

that's weird, how are they named differently on yours? Yes, delete that volume.

On Sat, Feb 29, 2020 at 9:11 PM Tomáš Hubík notifications@github.com wrote:

Maybe the problem is in name of the volume in the script. See the volumes below:

root@BTCPayServerVM:/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Tools# docker volume ls DRIVER VOLUME NAME local 2d36ac473f4b7456ad21f834344796988d349d94e13771a0d8708f019862d34e local 3c25a6f22b3e0f9a6ac43d55d113e1fa53b32f4310c1f82096af5f7928056472 local 3effac35aac4dc9a9e1f6348b1c37a22ea8f8a24d08d17133ab8e37e3fa76f83 local 3fe1267a5b86cddad9b902742eddc97a7c3d8dcbf0aa3431eae89169ccc9b83a local 5f7ae81a1e3c3cdd198a5a48c23827f9cac28213622832a5afc3f040879a5c64 local 7a1df9b58b40b410abbc7320b5ba13a9f430737f6d657be89a73586319dfcf5d local 7dde42e4485332daa7f790e7a5c9d42863b2cf79616556a26cbfd019f0084a11 local 8b7544fd24740e85398362eecc9101b8aeadbeacf9d1af23d8bf55374a77001c local 8cc5980d18c7fe18ea939690f5af92d2a39b0bb8f3550637c0e2ade1e9405477 local 8d06acd3e8d387a738282e4da2be5800e29aba82479de3f12d4a073181baffe8 local 21fa5b39d0495a4dc6c7ab407083e8795a87172653f668e4b4850dd365893890 local 23ba14c3c8c371e60425efbdcad3137354544e50f317d5d4d98768d75df6b09c local 36b444d5a3e703d3a953f259eac3f4f30bf5fb218b0607500d4e7417c2e83fb9 local 57f8aef6b0ed3b6025553b84dca118dfc86264f49e653f0a6c70548cb4ee69bd local 77c57ba424ba88524b48e8a384dc213e3716e3724ca22e3c815d17c923c0d1d4 local 82e5d0a4e8d8900d4eb6c06e63f9dc8ae35eeeefa1d7ece71fb4d55677c7f388 local 83b213e2907e88de099b018f0e8d473669cb6c34c372c91346f6553293f2a7a2 local 140b33dbf36c87c2ef3ca1e5f193920bc26628b1d918bbe0de08025e405f1fe7 local 0620cc270a4ce925e44c1fbe25f3b26486db50e03c70ff92db02b75d2c08e0ca local 5234cb52faafa7df2973a60671d352650ed2cb2ea4741cf99c9e751aefbf2274 local 8186c38277fed1394468af42a57d535b3cb64dc5330546af7c7829f087322fdf local 21062c6f67e54379e3ce8609786f4cd47e88d6d6f29e4ec0f994c77b6c710c36 local 460820a31882345e16d16f1073b40c9c8c4f1c4408f7b37a54c5ef6decf3e0bb local 953138e6b7fcf00cb760d0a097679371e30a93bfe888e175a1eefbd2499edd1f local 1245130f4b0e8aa26eb3f0e4f801778f963276867213183048b53aec29feece0 local 4850200883ce6adb0709962410dedf6db99a9162d19191f086b7db1c7c8709d5 local a8c04f01219cb6f6596b7cb20ee32da42cc92a08db2e04de12cbdc83554f6c3e local a16e3c6a563513903d2ba7f7ea220b2d379f148bd6f64473119bcad12393800d local a2572223f1355feb3581f4cb0bb355a8f8825bed6d9799f6a6e6a889b29f2631 local ace75027a841e85a442676074773ec1a14d1bf3d62958938a1c8c7e090da32d9 local b0e948388b5659535a65a4358d125fa4c3ad67dfe15038f86efbeb89cd6fc027 local b7817f5dd0999359d53eb5a0cacbc005682563dd29009b25d3b0800326b2ae29 local bba80b230d456eab23cd6ead6ced96425e0ed442212b41b60a86ba45d3a8ace9 local bbcf4476b3f76d541c748227eccb749a6d42f8a84ce2a25d35c0029ad8f1fb8e local bf9c9f5583fd8706d79a675a5eacab61fcd58c1893fd996124785390445b494a local c1c731907afb3aab31293177dead93b899b53b566cc3ec23687a64226081697f local c06fed7e7a50b763851f58955e729e2133cfb5fe9207baec2bfc805bf02611c1 local c471e3a8206e2c081429a331ed58a7361c9776fe42292cbb53347136bb717913 local dacc03f3991e66787bd16522218f1504777291da5b349c1b06398f78c22e3db2 local e914cef4b44335bc20165f7a8bbcd077d83f8856a6824ceac17c50b6431029a8 local ef5c4c8ffd22866ffde91758125258f011e4b2952b5686f2a637597804b32756 local fc4f6fa9a2903eb8e6c2d8d653d71b9466fecb219c5f78e598dbdf49dae7e209 local fe5ee78e3104ef39792a8d7e68289173b523ba076a94b45c788e9dc63441b412 local fff97747746d378f1d0d73f909a1d54e1c4ea91cfea42f29f6487b1c2d7c879e local production_bitcoin_datadir local production_bitcoin_wallet_datadir local production_btcpay_datadir local production_clightning_bitcoin_datadir local production_clightning_litecoin_datadir local production_litecoin_datadir local production_lnd_bitcoin_datadir local production_lnd_bitcoin_rtl_datadir local production_lnd_litecoin_datadir local production_nbxplorer_datadir local production_nginx_certs local production_nginx_conf local production_nginx_html local production_nginx_vhost local production_postgres_datadir local production_tor_datadir local production_tor_servicesdir local production_tor_torrcdir local production_xmr_data local production_xmr_wallet

And the script is trying to delete volume generated_lnd_bitcoin_datadir, which does not exist. Should I remove the production_lnd_bitcoin_datadir?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/btcpayserver/btcpayserver-docker/issues/272?email_source=notifications&email_token=AAN357ROLMDUZSXHXKSIM5DRFFVWJA5CNFSM4K4VOFW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMEZII#issuecomment-592989345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN357WEFN2I6SSLJR5574DRFFVWJANCNFSM4K4VOFWQ .

hubiktomas commented 4 years ago

Maybe the volumes used to be named that way in the first versions of BTCPayServer? Anyway. Manually removing the volume helped and now I have the seed. Thank you! Should I leave this one opened so we can investigate more, why I have different names of the volumes? Others with old instances can be affected in a similar way...

rockstardev commented 4 years ago

Yes, you had very old version of docker-deployment where the container was named differently.

I guess we can modify that script to check for existence of production_lnd_bitcoin_datadir and delete that instead if present. That should solve the issue and ensure it doesn't repeat to anyone else.

hubiktomas commented 4 years ago

That would definitely help. I was also thinking whether this renaming could affect some other scripts and functions of BTCPayServer other than this migration script.