Backup Redis data with shell command and Cloud Run - MRLIVING/Becca GitHub Wiki

TOC

Overview

image

Exporting data from Redis

gcloud redis instances export gs://${bucketName}/${redis_id}_$(date +%FT%H%M%S).rdb ${redis_id} --region=asia-east1 --project=${proj_id}

Execute the Redis Exporting command via Cloud Run

Docker Quick Start

Cloud SDK image

Dockerfile

  • Help to build a docker image and run the export command during container start

Build and Submit the job docker image

Create Cloud Run Job

Create Cloud Schedule to trigger the Cloud Run Job

Reference