Creating a Restore Point or Snapshot for the Oracle Database Simulator

You can create a restore point or snapshot at the end of a lab and go back to it, so you do not have to restart the lab from the beginning.  For example, once you complete Lab 3, you create a restore point at the beginning of Lab 4.  During Lab 4, if there is any error, then you can go back to the restore point at the beginning of Lab 4 instead of starting from Lab 1 again. 

To create a snapshot, run the following command from the simulator directory:

# ./snapshot.sh  
Usage: snapshot.sh [-c | -r  | -l]  [] | -h                                                                                                                                                                                                                                                                                        

Options:                                                                                                                                                                                            
  create  [ha|single]             Create a new snapshot of the simulator                                                                                                            
  restore   [ha|single]       Restore the simulator to a previous snapshot
  list  [ha|single]               List all snapshots created with their IDs
  help, -h                                        Display this help and exit
 is mandatory. You only need the name of the environment 
without 'node0' or 'node1' in case the simulator environment is HA
 is either 'ha' or 'single'. Default is 'single'

Use this script to create and restore snapshots of the Oracle Database Appliance simulator. This is useful when trying different scenarios or for creating backups.                                                                                          

# ./snapshot.sh create oda-1 
/scratch/user/simulator_19.12_ade/simulator_19.12.0.0.0/snapshots.dat doesn't exist. Creating a new one...
Snapshot with ID: 1 has been created successfully. Timestamp: Wed Sep 22 14:01:24 PDT 2021
# ./snapshot.sh list oda-1
ID      CONTAINER NAME             DEPLOYMENT TYPE  TIMESTAMP
1       oda-1                      single           Wed Sep 22 14:01:24 PDT 2021
#  ./snapshot.sh restore 1 oda-1
Snapshot with ID: 1 has been restored successfully!