-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compact channel.db before lnd-rescue backup? #2752
Comments
Surely doable and built-in to lnd, needs running lnd with the autocompact flag like:
and wait the message when the compacting is finished. Running it the first time will take long as well, but the resulting file should be less vulnerable. Should probably be a separate script which could be called from REPAIR also. |
OK did a test run on my testing node ... the results are great .. the resulting file is over 78x smaller. This was the result message (maybe to check for success):
BUT that command is really hard to put into a RaspiBlitz script, because it keeps runnig after that with wLND waiting to get wallet unlocked and is not finishing:
So it would need a more complex monitoring script - running compacting in the background with writing logs into file and monitoring for success or error and then shutting down the lnd again. @openoms Basically I get the feeling - this is not how the compacting feature is meant to be used. Maybe it makes more sense to run the lnd in general with the config |
My concern with using it by default is the lack of control. It might take a half an hour when one only needs a quick restart (especially that there are plenty of unnecessary restarts still). Did you look at the PR #2761 yet? Can test from the repair menu. |
Ah OK ... havent checked the RP #2761 yet (insert tomato eyes smiley here) .. so perfect. Lets offer it as a repair option with the v1.7.2 |
Merged PR to dev and changed the interaction to a whiptail dialog so that it fits better into update process dialogs. |
On my test when using the "UPDATE > RELEASE" option from menu (and then saying DOWNLOAD BACKUP) it compacts but then is exiting the dialog - seems to send a terninate signal somehow. @openoms that |
tested ok now. |
Check if the pre-compact backups are not part of |
Ah OK ... I dont see any backup filese in the data dir. Putting back to final testing. |
Tested this multiple times - looks good. Closing issue for release. |
I can see on some testdevices the channel.db getting very big. That slows down the backup process thats recommended during update, etc so far that you get the feeling the system is on hold.
@openoms Is there an easy way to compact (reduze in size) the channel.db before we make a lnd-rescue file?
The text was updated successfully, but these errors were encountered: