In this post will show you the detailed functionality of ZFS clone. Here, I have used a test file system called oradata and I want to modify it, but still I want to keep a version of the unmodified file system. Please follow the below steps to test the same.

Step 1: Check the solaris11 server is up and running. Then login to the server as a root user.

Step 2: Execute the zfs list command to display the ZFS file systems that are currently configured in the oracledb pool. Create the oradata file system by using the zfs create command.

Step 3: Create a snapshot of the oradata file system. Display the results.

Step 4: Create a clone of the snapshot and confirm the creation.

Step 5: Compare the attributes of the snapshot and the clone.

Note: The preceding commands demonstrate the major difference between the snapshot and the clone. The snapshot is not available and the clone is available, as well as modifiable.

Step 6: Assuming that you have made the modifications in the clone, look at the space usage of the clone.

Note: The used column for the clone. The space utilization has gone up when compared to the same column in step 4. Because you created a file in the clone, it will use more storage to keep track of the new file.

Step 7: Now, I will proceed with replacing the main file system with the newly modified clone.

Note: If you do the math, the used space of the clone oradata2 now reflects the total of the main file system oradata and the clone, that is, 31 KB + 19 KB = 50 KB. This means that the new file dbtest in the clone has been added to oradata.

Step 8: Rename the main file system as oradatabackup and rename the clone to replace the main file system. And you will find the result as same like below.

Note: Now you have the datasets that reflect the modified picture. If you need to go back to the previous version of oradata, it is saved as oradatabackup. This method is useful when you want to maintain the previous version of the data or overlay the production file system with modified data.

Step 9: Destroy oracledb by using the zpool destroy command. Confirm the action.

Now you have learned how to use the zfs clone for backup and recovery in oracle solaris 11.

If you find this post is useful/helpful, please follow, like and share. Thank you for visiting my blog!!!