Can I create/save a hibernation state to recover from *without* actually hibernating?
There are at least two reasons why you can't do it.
First one. Hibernation works thanks to ACPI power states. It's not that simple as "dump RAM to hard drive and shutdown". RAM isn't everything, there are also devices that need to be reverted into their previous state. That's where ACPI joins the party - it lets you suspend devices when entering S5 state and resume them when returning to S0. But S5 implies shutdown, so you can't hibernate computer without shutting it down.
Second one. Let's assume we have some hardware that would allow to hibernate a running computer while keeping it on. This creates a problem similar to those that you could face when dealing with parallel computing.
Computers work sequentially. They execute series of simple (really simple, like "increase that number by 4") instructions, one by one. Modern PCs have multicore CPUs and could theoretically process multiple instructions at once, but it's not always possible. For example let's say we have three instructions.
- Read X from user.
- Multiply X by 2.
- Increment X by 7.
Step 2 can't be processed until step 1 is finished, because X is unknown at that time. Similiarly, step 3 can't be processed until step 2 is finished, because value of X is very likely to change in step 2. These steps must be processed one by one.
Now let's imagine we have a computer that processes bank transfers. You have some amount of money on your bank account and you want to transfer $100 to your friend's account. The algorithm looks like this and has to be processed step by step for some reason:
- Decrement the amount associated with your account by $100.
- Increment the amount on your friend's account by $100.
- Transfer has been processed, so remove it from the transfer queue.
Computer starts to process this transfer and suddenly, between steps 1 and 2 it turns off due to a power outage.
Now, if the computer wasn't "hibernated but alive", it will start to boot and realize that something went wrong - it will know that it should verify all recent operations. Everything is fine.
But if it was "hibernated but alive" before it started to process step 1, there's a problem - the computer doesn't know something went wrong, because it remembers everything was fine when it was being hibernated. But the data on hard drive has been updated and $100 is already withdrawn from your account, but not transferred to your friend's account yet. But computer doesn't know about that, because it happend after hibernating it.
The computer will take another $100 from your account and transfer it to your friend. The first $100 is gone.
There are hundreds of thousands of problems like that that could arise prom "hibernating" a running system.
You can accomplish something similar if you were to work within a virtual machine. With a virtual machine, you can take snapshots of your computer at any point in time and revert back to them. This can be done with VMWare, Hyper-V, and VirtualBox.