OCI File Storage provides network file system storage. One of its capabilities is the option to create snapshots.
In this post we are building a shell script that creates snapshots regularly and deletes those older than a specific number of days

Steps
Get the ocid of the file system you want to create snapshots for

Create an script like this
# rm oci_fs_snapshot_with_retention.sh # wget https://raw.githubusercontent.com/javiermugueta/rawcontent/master/oci_fs_snapshot_with_retention.sh # chmod 700 oci_fs_snapshot_with_retention.sh # fs=<filesystemocid> # ./oci_fs_snapshot_with_retention.sh $fs <retentionperiodindays> #
Let’s see how it works by executing the script from DevCS


That’s all folks, hope it helps and stay home! 🙂
As probably most instances uses multiple volumes, maybe extend this info with using volume groups?
LikeLike
Hi Richard,
Volume groups apply to block storage, this post is related to File System which is kind of NAS storage.
LikeLike