Azure NetApp Files Fast Forking
Prerequisites
You need a PostgreSQL cluster with Azure NetApp Files backed node sizes to use the Azure NetApp Files Fasting Forking feature. Please read Creating a PostgreSQL Cluster with Azure NetApp Files on how to create a PostgreSQL cluster with Azure NetApp Files.
Azure NetApp Files Snapshots
An Azure NetApp Files snapshot is a point-in-time file system (volume) image. It is ideal to serve as an online backup. You can use a snapshot to create a new volume (clone), restore a file, or revert a volume.
This process allows an almost instant duplication of the data, meaning you can restore to a previous snapshot, or fork a cluster in only the time it takes to provision a new PostgreSQL cluster.
Low-overhead snapshots are made possible by the unique features of the underlying volume virtualization technology that is part of Azure NetApp Files. Like a database, this layer uses pointers to the actual data blocks on disk. But, unlike a database, it doesn’t rewrite existing blocks; it writes updated data to new blocks and changes the pointers, thus maintaining the new and the old data. An Azure NetApp Files snapshot simply manipulates block pointers, creating a “frozen”, read-only view of a volume that lets applications access older versions of files and directory hierarchies without special programming. Actual data blocks aren’t copied. As such, snapshots are efficient in the time needed to create them; they are near-instantaneous, regardless of volume size. Snapshots are also efficient in storage space; only delta blocks between snapshots and the active volume are kept.
For more information, you can read How Azure NetApp Files snapshots work.
Taking Snapshots
To create snapshots of your PostgreSQL cluster, click the Backups & Snapshots option on the left and then click the Snapshot tab on top.
Click the Create Snapshot button to create Azure NetApp Files snapshots, you should see “Snapshot triggered across cluster.” Wait for a while, you should see an Events table that lists the snapshots you created so far.
Forking a New Cluster Using the Snapshots
To fork a PostgreSQL cluster with Azure NetApp Files from your snapshots, go to the Fork tab on top. Choose the snapshot you want and click the Fork button.
You need to specify a Primary Data Centre Network which is used for your new forked cluster. The default value of the Primary Data Centre Network is a CIDR range next to your Cluster Network & Storage Network, which always works if you are creating a cluster using an Instaclustr’s account. If you are creating a cluster using an Run In Your Own Account (RIYOA) with a custom Virtual Network, you need to specify a CIDR range that does not exist in your Virtual Network.
After you click the Fork button, the forked cluster will be created.