Skip to content

Snapshots

A snapshot is a copy of your VPS’s whole disk: the system, installed software and /home. Take one before a risky change, such as a database migration or a big upgrade, and roll back to it if the change goes wrong.

Terminal window
lt vps snapshot create dev before-migrate

The VPS can be running or stopped. A running VPS keeps running; its disk pauses for a moment while the copy is cut. The command waits until the snapshot is ready. Without a name, it is called snap-<date>-<time>.

A snapshot is taken as if the VPS lost power at that moment: RAM and running processes are not saved. Programs that keep data in memory, such as a database, recover the way they do after a power cut. To be sure, stop such programs, or the whole VPS, before you take the snapshot.

Terminal window
lt vps snapshot ls dev
lt vps snapshot rm dev before-migrate
Terminal window
lt vps stop VPS_ID --yes --wait
lt vps restore dev before-migrate
lt vps start VPS_ID

The VPS must be stopped. Restoring replaces the disk with the snapshot, and the disk’s current state is not kept: take another snapshot first if you may want to come back to it. The snapshot itself stays, so you can roll back to it again. The next Start boots the snapshot’s disk.

The dashboard has the same actions in the Snapshots section of a VPS.

  • At most 10 snapshots per VPS.
  • A snapshot is deleted after 30 days, or after --expires-in-days N (1 to 90).
  • A deleted VPS keeps its snapshots until it is purged (at the end of its restore period, or at once with lt vps delete --now); the purge deletes them.
  • Snapshots are kept on the same storage as the VPS’s disk. They protect you from your own mistakes, not from losing that storage: copy important data elsewhere too.
  • Snapshots are not billed separately today.