3

I work on multiple projects with multiple type of servers required, and when I switch project I shut down any of the applications and start the ones I need at that moment from the terminal.

I considered using a VM to switch project, but I was wondering if there was a way to save my terminal session (a snaphshot) for later use.

  • 1
    It's unclear (to me) what you are trying to do exactly. Can you be more specific? It seems as if the applications you are trying to save state for are running on several different servers - not just the local machine. If this is true - can you script the initiation of the processes you need running? – Scot Feb 19 '14 at 21:41
  • Yeah, I might not have been very clear. I basically would like to hibernate running terminal session (command prompt) and awaken it when I want to us whatever process I was running there (this could be a postres service, a redis service...) – machunter Feb 19 '14 at 21:46
  • The terminal session includes processes running externally? Or are all processes running locally? By snapshotting a terminal session, can you simply record the commands, and play them back to restart - or is this insufficient? Can you temporarily stop and restart the processes in question in order to accomplish your goal? I'm not certain that snapshotting is the way to go... – Scot Feb 19 '14 at 21:54
  • No it's all internal, yes i can stop and restart and it's fine, i was just curious to see whether there was a solution to let me start the process from where it was last (with its state at that moment.) But you might be right as to whether it's the right way to go. – machunter Feb 19 '14 at 22:24
  • OK - here's an idea...script the initiation of your processes, then pause the script (kill -STOP PID). Restart it with (kill -CONT PID). That may work for you... – Scot Feb 19 '14 at 22:38
1

Have you tried using screen ?

With screen you can disconnect from the terminal and then reconnect to it later.

  • 2
    I wasn't talking about a remote terminal session, what I basically want is "HIBERNATE" a local terminal session to disk so that it doesn't use any of the resources of the system. – machunter Feb 19 '14 at 20:10
  • Screen works perfectly fine on local sessions as well. – Burhan Khalid Feb 19 '14 at 22:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .