I recently upgraded my Lenovo PC (16-GB RAM; 2TB-HD) from Ubuntu 18.04 to 20.04. I had saved the ".bitcoin" directory (and subdirectories and files) to an external hard disk drive. Since then I have not been able to run Bitcoin Core successfully as I was able to in 18.04.
I installed the Bitcoin Core using the Ubuntu Software app in Ubuntu 20.04, and then substituted the new files with all the files in the backup of ".bitcoin" directory (along with all the saved subdirectories and files). I did this so that I would not have to rescan the entire blockchain which takes up to 2 weeks these days.
I did note that the new installation placed the ".bitcoin" directory in a new directory - whereas previously (in the Ubuntu 18.04 version) it had been in the home directory it is now in the
/home/snap/bitcoin-core/common directory. For clarity I repeat that I replaced the new ".bitcoin" directory with the old ".bitcoin" directory (from my backup) - placing in in the "common" directory.
Now the Bitcoin Core starts fine, but gets stuck on "rescanning". I aborted the process after 3 hours and attach a screenshot of the message I was given which was:
Error: Failed to rescan the wallet during initialization.