With Database Lab clones, you can verify any changes and without any risks for the source database (such as production).
- Connect to your clone and execute DDL or DML query – for example, drop some table:
- At the Database Lab clone page, click the Reset button:
- Wait for the OK status and connect to your clone again. The data will be recovered to the initial state:
Before you run any commands, install Database Lab CLI and initialize configuration. For more information, see Install and initialize Database Lab CLI.
dblab clone reset
Reset a clone
If you need to reset the clone to the initial state and discard all changes were done (revert to the snapshot that was used for clone creation):
dblab clone reset CLONE_ID
The clone has been successfully reset: CLONE_ID
To reset to the latest available snapshot (feature available in DLE version 2.5+) – this is especially useful for long-living clones because you can get the fresh version of data not changing the DB credentials (including port) of your clone:
dblab clone reset --latest CLONE_ID
Finally, if you want to reset the clone's state using specific snapshot:
dblab clone reset --snapshot-id SNAPSHOT_ID CLONE_ID
--snapshot-id must not be specified at the same time.
- Guide: Destroy a clone