How do I run a pruned Bitcoin Core node on linux indefinitely without running into this wallet error? I know it's possible from the Bitcoin Core app on Windows but I'm not sure how to achieve it on linux.
Like the following question, I am running into "last wallet synchronisation goes beyond pruned data" every few days on a linux Bitcoin Core pruned node
It's possible I
kill'd it improperly and it's also possible it had an unclean shutdown from an oom kill.
Still, I would think something as important as a wallet would have a sensible recovery mode that didn't involve downloading the whole blockchain when you really just maybe need the few most recent gigabytes.
I tried reindexing, as the error suggested, and it wiped all my blockchain data and started downloading everything from 2009.
Luckily I had made a backup of the blockchain data and I knew I could get a copy from around the wallet creation time from github blockchain downloads.
As suggested on the web, the "rescan" (now rescanblockchain) is supposed to be used in this situation but when trying it wouldn't let me specify a blockheight earlier then the data I had ("Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.") The whole point as a user is to go out on the blockchain and download only what's needed to bring my wallet up to date so this error seems to defeat the purpose of my situation.
To sum up, based on my experience with the Bitcoin Core Windows app, I know it's possible to run a pruned node indefinitely but I'm not clear how this is achieved with the linux version.
Theory 240212: I've been letting Bitcoin Core run without having the wallet loaded and after some time it prunes out old data but it hasn't updated the wallet so when I next load the wallet the data from which the wallet could sync is no longer available. Experiment: Always load wallet when Bitcoin Core is running. Result: I included wallet=wallet in the confs to ensure wallets were always loaded when running the node and it's been more than a week and wallets are still operating correctly in pruned mode.