1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
1
An instance that is hibernated is literally "stopped in its tracks" - there will be open files, structures in memory, processes that are running and potentially disk volumes that aren't in a healthy state - because the operating system didn't know it was supposed to flush things to disk.
So if you take a snapshot of it while hibernated and then try to launch an AMI from that, it's going to launch from exactly the state it was in; which isn't necessarily where the operating system expects to start from. So it might work. But it might not.
Contenido relevante
- OFICIAL DE AWSActualizada hace 7 meses
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 2 años
Thank you, that makes sense to me. Is there a supported method for running automated snapshots on instances that may or may not be hibernated?
I am concerned about the possibility of not being able to trust backups for instances that are likely to be hibernated when backups are taken. Obviously this possibility, if it exists, is untenable in most cases.
A snapshot of a running or hibernated instance carries the same risk - the filesystem(s) may not be in a stable (shutdown) state. This is particularly true for applications such as databases which at any point in time are not necessarily completely flushed to disk. With a running instance you might send it a single (or use Systems Manager) to temporarily halt writes to the disk, flush buffers then snapshot; but that's not possible with a hibernated instance.
Are you saying that the risks posed when snapshotting a hibernated instance are no greater than the risks posed when snapshotting a running instance? If I were to run a snapshot on a hibernated instance and find that I could not connect to the instance after restoring from the snapshot, my assumption would be that a hard reboot would resolve the issue. I would lose the processes that were in memory when the snapshot occurs but the instance itself would be recoverable. Am I missing anything that would void this assumption. Thank you for taking the time to answer my queries.
In both cases, a reboot might fix the issue. In general, modern file systems are pretty resilient and a reboot is highly likely to fix any issues. The same can't be said for all application data structures. Again, many (if not most!) applications are good at recovering from being interrupted (a power failure would give the same experience) but there are no guarantees.