How to save and restore a terminal station