How to restore manually Saved State files of Terminal?
It seems that the windows.plist has been corrupted during the backup, as it's empty.

The Terminal restores correctly when doing the following test:


Run Terminal.
Type anything like: echo test 1.
Kill the terminal explicitly, e.g.: killall Terminal.
Run again, it should have the previous message/state.
Removing files and restoring from it, it'll have the same state.


The corrupted .plist file can be manually rewritten by the following hacky steps:


Convert plist into its XML representation (Terminal will still recognise it):

plutil  -convert xml1 -o windows.plist windows.plist

Edit the file to match its windows id (NSWindowID) to the appropriate files. Or create as many new windows manually to have the same files, kill the terminal, replace only the window .data files and re-run again.

However if the data files are not inconsistent with plist file, the Terminal will restore the default session overriding your files.