Most of us have been there: a routine apt upgrade, a new kernel, a change to a
configuration file, and the machine that worked an hour ago no longer starts, or no longer answers.
On a physical server, that is the start of a long evening. On Baadal, if you took a snapshot first,
it is a two-minute fix.
What a snapshot is
A snapshot records the state of your VM's disks at one moment. Later, you can revert to it: the VM's disks go back to exactly that state, as if nothing had happened since. Taking one takes a few seconds and works while the VM is running.
When to take one
- Before upgrading the operating system or the kernel.
- Before installing or upgrading drivers, CUDA, or a large software stack.
- Before changing the network, firewall or SSH configuration, the changes most likely to lock you out.
- Before running an experiment or a script that changes many files.
On the VM's page, under Snapshots, click Take snapshot. You can keep up to three snapshots of your own per VM.
Snapshots on a schedule
On the same page, you can also turn on daily, weekly and monthly snapshots. Baadal keeps the latest of each kind: each new daily snapshot replaces the previous daily one, and so on. With all three on, you can go back a day, a week or a month. Periodic snapshots are taken only while the VM is running.
Getting the most from them
- Quiet the VM first. A snapshot of a running VM is like pulling the plug at that moment. Files being written, especially databases, may need a recovery when you revert. For a clean snapshot, stop the database or shut the VM down first.
- Delete snapshots you no longer need. A snapshot keeps every block that changes after it, so an old snapshot grows over time and slows the VM's disk slightly. Once the upgrade has proved itself, delete it.
- Remember what each one is for. Snapshots are listed with the time they were taken; note it alongside the change you made.
Snapshots are not backups
Snapshots are stored together with the VM's disks. They protect you from mistakes inside the VM, not from the loss of the VM itself, or from deleting it. Keep copies of data you cannot recreate, such as thesis results, research data and course material, somewhere else as well: your department's storage, the institute's cloud storage, or another machine.
Reverting
In the snapshot list on the VM's page, click Revert next to the snapshot. Everything written to the disks after the snapshot is discarded, so copy off anything you want to keep first. Clone the VM if you would like to keep both states.
See the FAQ or write to baadalsupport@cc.iitd.ac.in with your VM's name.