Was playing with ipython history commands, experimenting with combining -l and -g to search a limited amount of history, and using -n to see which session a command came from.
Suddenly I got an error (I wish I still had the exact text on my screen) ... something about the history thread encountered and error and stopped, and no more history would be saved. And it said also something about "database locked". After that happened, %history would not recall any history.
So I stopped and restarted ipython, and found that it had history only from the newly restarted session. I stopped and restarted again, and even tried closing and reopening my WSL-Ubuntu window with no luck. It appears that I lost months and months of history.
Then I decided to look for the ipython history file, and found this little gem:
dino@DINO:~$ ls -l $( ipython locate profile default )
total 14132
drwxrwxrwx 1 dino dino 512 Jul 17 2019 db
-rw-r--r-- 1 dino dino 14442496 Mar 24 14:16 history-corrupt-2020-03-24T14.17.27.480963.sqlite
-rw-r--r-- 1 dino dino 28672 Mar 24 14:24 history.sqlite
drwxrwxrwx 1 dino dino 512 Mar 18 2019 log
drwx------ 1 dino dino 512 Mar 18 2019 pid
drwx------ 1 dino dino 512 Mar 18 2019 security
drwxrwxrwx 1 dino dino 512 Mar 18 2019 startup
Wow! Look at that! 14442496 Mar 24 14:16 history-corrupt-2020-03-24T14.17.27.480963.sqlite
Looks like ipython actually saved all that history after all! Now the question is, does anyone have any ideas how I might find and remove the corruption from the sqlite file and restore all or maybe most of my history??