1

I just did a Time Machine restore of the full system on Catalina, and seems to have worked pretty well, with one exception - I had several Terminal windows open with bash history, but these haven't been restored this time.

Where are these past terminal sessions stored? Could there be a way for me to restore these files specifically from some past Time Machine backup?

I did this once before with Chrome when it lost open windows and tabs; Chrome is a little temperamental when restoring open windows and tabs; in this case it restored some but not all; then, close the app and reopen it and all the original tabs appeared. Not so with Terminal, though (I closed and reopened the app and the lost windows don't appear).

Wondering if anyone knows which files I could look for on a Time Machine backup and try restoring those specific files manually to get the sessions back.

Update

I have the following in ~/.bash_sessions

mbp:~ m$ ls -lat ~/.bash_sessions/*.session
-rw-------  1 m  staff  52 23 Jun 12:14 /Users/m/.bash_sessions/6719BAE0-CEC7-4629-B1D6-0A11D0E79409.session
-rw-------  1 m  staff  52 23 Jun 10:12 /Users/m/.bash_sessions/33C3A9A3-0179-45BC-996F-9FC540BC3F91.session
-rw-------  1 m  staff  52 23 Jun 09:52 /Users/m/.bash_sessions/BEB93945-EECB-495C-85CF-BA6DD8E26DF0.session
-rw-------  1 m  staff  52 23 Jun 09:39 /Users/m/.bash_sessions/3D845B8E-6924-4E60-B941-8E00DF6136CA.session
-rw-------  1 m  staff  52 23 Jun 09:38 /Users/m/.bash_sessions/03774130-209A-4420-9EE5-3D7E03A70824.session
-rw-------  1 m  staff  52 23 Jun 09:31 /Users/m/.bash_sessions/78EF93CA-705B-41D0-A2E7-00AE41C37BF5.session
-rw-------  1 m  staff  52 23 Jun 09:31 /Users/m/.bash_sessions/8E7F0142-4F7A-49B3-88BF-51B404696392.session
-rw-------  1 m  staff  52  3 Jun 09:54 /Users/m/.bash_sessions/9D750CAA-397F-4E84-9EB1-AB7991BF4A84.session
-rw-------  1 m  staff  52 31 May 19:20 /Users/m/.bash_sessions/0BF6D4CF-53AA-4BC9-8CAE-44C6C29531CA.session
-rw-------  1 m  staff  52 31 May 18:32 /Users/m/.bash_sessions/12A8BB4A-828B-4936-9D83-F3CD95D3A142.session
-rw-------  1 m  staff  52 31 May 18:19 /Users/m/.bash_sessions/F91389BC-C1F3-477C-94D9-A9535C7AB2FA.session
-rw-------  1 m  staff  52 31 May 18:09 /Users/m/.bash_sessions/5B877A51-A4C3-4420-AD63-BA55CF19513E.session

...clipped more than 100 lines ...

-rw-------  1 m  staff  52 20 Feb 10:57 /Users/m/.bash_sessions/E7F75EDA-9EA3-406C-99BA-281B1CFFFCC1.session
-rw-------  1 m  staff  52 19 Feb 16:04 /Users/m/.bash_sessions/0B620390-0137-46FB-B3E9-C77F50A677E2.session
-rw-------  1 m  staff  52 19 Feb 16:03 /Users/m/.bash_sessions/F645F431-BF46-4406-81B3-8925324CE76D.session
-rw-------  1 m  staff  52 18 Feb 09:37 /Users/m/.bash_sessions/1422B462-17ED-49D7-9481-AB54A812D47B.session
mbp:~ m$ 

15
  • Did you restore from a Catalina backup or did you restore a Mojave system into a Catalina installation? – nohillside Jun 23 '20 at 8:57
  • From a Catalina backup - a backup of only a day previously. – mwal Jun 23 '20 at 10:47
  • This might help - apple.stackexchange.com/questions/87888/… – High Performance Mark Jun 23 '20 at 10:59
  • Several other apps managed to restore their open windows correctly - sublime text, sublime merge, textedit; but on this occasion, only terminal didn't. – mwal Jun 23 '20 at 11:01
  • There are no recent bash sessions in that list, so I assume Terminal was still open while the backup was running? – nohillside Jun 23 '20 at 11:31

You must log in to answer this question.

Browse other questions tagged .