When we clone a Colleague environment, we have to create a complete copy of the existing production environment to use as a baseline. Before, that meant copying hundreds of files from one directory to another.
With the datasets laid out as they currently are, we can simply run a zfs clone command to create a new dataset from an existing snapshot. Because we store backup plans in the dataset properties, it's important to export that information first -- see below for details -- but otherwise the procedure runs as follows.
- Rename an existing snapshot to clearly mark it as a clone (zfs rename m10-1/production@2017-05-10-060000 m10-1/production@devclone20170510)
- Stop listeners for the target environment and remove it with SA Valet as per the regular cloning process
- Make sure there are no users in the target directories
- Unmount the dataset with the zfs unmount command (zfs unmount [-f] m10-1/development)
- Destroy the target dataset (zfs destroy m10-1/development)
- Clone the new dataset from the production snapshot that you renamed (zfs clone -o mountpoint=/datatel/coll18/development m10-1/production@devclone20170510 m10-1/development)
- Proceed with the Colleague cloning process as usual
Once you've finished everything, you will want to restore the backup settings on the dataset and may want to go over the settings to be sure they all match the other environments.