Yes, your server and data are on cloud, but to avoid the risk of unexpected data loss still you need to follow standard backup mechanisms provided by cloud providers like snapshots or replication. The best way is to take the disk snapshots – Operating System disk as well as data disks. And the best part is Scheduled Snapshots by which you don’t need to worry about regular snapshots. Here see a simple demo for scheduled snapshots in Google Cloud Platform.
Also read : How to add Container Images to Google Container Registry (GCR)
First of all we need to create snapshot schedule and define when to take snapshots, where to keep it, how long you need to retain the snapshots etc.
Goto Computer Engine -> Snapshots -> Select Create Snapshot Shedules
Provide name and description for the schedule and also choose region if you want to keep it at some specific place.
Also choose the frequency as Hourly, Daily or Weekly and when to take the snapshot. In below example we have selected to take weekly backup on every Tuesday between 3 – 4 AM. Also set to delete snapshots older than 30 days.
Create the schedule and see details.
You can do the same via gcloud console or using API as well, refer GCP document for the same.
So we have a schedule created to take snapshot in specific intervals and now we need to select which disk we need to take snapshot of. Goto Disks tab and select the disk you want to attach the snapshot schedule.
You can see, the disk is used by myserver-101 (which is my VM) but no snapshot schedules attached.
Now, click on disk and you can see the disk details; then click on Edit button on top and attach snapshot schedule, and then Save.
That’s all, now you have your weekly automated snapshots mechanism which will take snapshot every Tuesday and will delete older snapshots automatically.
Since every snapshots will take some space on disk, please read GCP Pricing for Disks and Snapshots before you configure your snapshot schedules.
Disclaimer:
The views expressed and the content shared in all published articles on this website are solely those of the respective authors, and they do not necessarily reflect the views of the author’s employer or the techbeatly platform. We strive to ensure the accuracy and validity of the content published on our website. However, we cannot guarantee the absolute correctness or completeness of the information provided. It is the responsibility of the readers and users of this website to verify the accuracy and appropriateness of any information or opinions expressed within the articles. If you come across any content that you believe to be incorrect or invalid, please contact us immediately so that we can address the issue promptly.
Tags: GCP · Google · Scheduled Snapshots in GCP · Snapshots in GCP
Gineesh Madapparambath
Gineesh Madapparambath is the founder of techbeatly and he is the co-author of The Kubernetes Bible, Second Edition. and the author of 𝗔𝗻𝘀𝗶𝗯𝗹𝗲 𝗳𝗼𝗿 𝗥𝗲𝗮𝗹-𝗟𝗶𝗳𝗲 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻.
He has worked as a Systems Engineer, Automation Specialist, and content author. His primary focus is on Ansible Automation, Containerisation (OpenShift & Kubernetes), and Infrastructure as Code (Terraform).
(aka Gini Gangadharan - iamgini.com)
This site uses Akismet to reduce spam. Learn how your comment data is processed.2 Responses
Leave a Reply Cancel reply
Excellent article. Good work, your concept really helped me. Thank you for your contribution to sharing this wonderful information.
Google Cloud Platform Training
GCP Online Training
Google Cloud Platform Training In Hyderabad
Thank you