Choose the latest snapshot by default on the creation of a new clone
Goal
There are 3 snapshots:
$ ./bin/dblab snapshot list
[
{
"id": "zpool/clone_pre_20200210022148@snapshot_20200210022148",
"createdAt": "2020-02-10 02:23:26 UTC",
"dataStateAt": "2020-02-10 02:21:43 UTC"
},
{
"id": "zpool/clone_pre_20200210021941@snapshot_20200210021941",
"createdAt": "2020-02-10 02:21:34 UTC",
"dataStateAt": "2020-02-10 02:19:33 UTC"
},
{
"id": "zpool/clone_pre_20200207071546@snapshot_20200207071546",
"createdAt": "2020-02-07 07:16:57 UTC",
"dataStateAt": "2020-02-05 07:53:51 UTC"
}
]
The latest is created at 2020-02-10 02:21:43 UTC
However, we get "dataStateAt": "2020-02-05 07:53:51 UTC"
for the new clone:
$ ./bin/dblab clone list
[
{
"id": "joe",
"snapshot": {
"id": "zpool/clone_pre_20200207071546@snapshot_20200207071546",
"createdAt": "2020-02-07 07:16:57 UTC",
"dataStateAt": "2020-02-05 07:53:51 UTC"
},
"protected": false,
"deleteAt": "",
"createdAt": "2020-02-10 02:24:53 UTC",
"status": {
"code": "OK",
"message": "Clone is ready to accept Postgres connections."
},
...
}
]