Reputation: 153
I want to perform full backup for the database in the gcp
. Suppose if auto backup run at 3:00AM then I want to run manual backup at 3:00PM, so is there any way to do that.
Actually I came to know about exporting the data into the bucket, This is very suitable for me but again the problem is I have to manually export the data to the bucket, so there any way in which data export automatically to the cloud bucket so that I will set life cycle setting of the bucket data to be archived after 30 days.
Thanks,
Upvotes: 1
Views: 1934
Reputation: 1177
First of all there are two things backups and exports:
If you want backups keep in mind that if an on-demand backup is ongoing when an automatic backup is scheduled to begin, the automatic backup is rescheduled for a later time. If you want to run automated backup at 3:00AM you just need to set the time in Manage automated backups tab. Google Cloud SQL retains up to seven automated backups, plus all on-demand backups, for an instance.
If you want automated exports you can take a look at Cloud Scheduler. There is a tutorial showing how to use Cloud Scheduler and Cloud Functions to automatically export a Cloud SQL for MySQL database to Cloud Storage. You can set appropriate retention policy on the bucket to keep the data for 30 days.
Upvotes: 2