Wire your database client and close scripts cleanly.
Recent revisions are kept. Restoring one creates a new revision.