All Projects → Zenika → alpine-firestore-backup

Zenika / alpine-firestore-backup

Licence: Apache-2.0 License
Image that performs Firestore backups based on Alpine Google Cloud SDK image.

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to alpine-firestore-backup

argon
Campaign Manager 360 and Display & Video 360 Reports to BigQuery connector
Stars: ✭ 31 (+34.78%)
Mutual labels:  gcp, cloud-scheduler
plantuml-libs
A set of PlantUML libraries and a NPM cli tool to design diagrams which focus on several technologies/approaches: Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), C4 Model or even EventStorming and more.
Stars: ✭ 75 (+226.09%)
Mutual labels:  gcp
img ai app boilerplate
An image classification app boilerplate to serve your deep learning models asap!
Stars: ✭ 27 (+17.39%)
Mutual labels:  gcp
hotsub
Command line tool to run batch jobs concurrently with ETL framework on AWS or other cloud computing resources
Stars: ✭ 29 (+26.09%)
Mutual labels:  gcp
cloud-build-notifiers
Notifier images for Cloud Build, complete with build status filtering and Google Secret Manager integration
Stars: ✭ 79 (+243.48%)
Mutual labels:  gcp
inspec-gke-cis-benchmark
GKE CIS 1.1.0 Benchmark InSpec Profile
Stars: ✭ 27 (+17.39%)
Mutual labels:  gcp
gcp-storage-emulator
Local emulator for Google Cloud Storage
Stars: ✭ 43 (+86.96%)
Mutual labels:  gcp
cloud-desktops
Cloud-based Virtual Desktops on Google Cloud Platform
Stars: ✭ 14 (-39.13%)
Mutual labels:  gcp
openjdk-runtime
Google Cloud Platform OpenJDK Docker image
Stars: ✭ 58 (+152.17%)
Mutual labels:  gcp
awesome-cloud-security
🛡️ Awesome Cloud Security Resources ⚔️
Stars: ✭ 1,056 (+4491.3%)
Mutual labels:  gcp
gcf-packs
Library packs for google cloud functions
Stars: ✭ 48 (+108.7%)
Mutual labels:  gcp
gcb-visualizer
Cloudbuild pipeline visualizer with graphviz
Stars: ✭ 21 (-8.7%)
Mutual labels:  gcp
spingo
A collection of Terraform and bash scripts to setup an enterprise-grade Spinnaker deployment on Google Cloud Platform
Stars: ✭ 36 (+56.52%)
Mutual labels:  gcp
Google-Cloud-Study-Jams
Resources for 30 Days of Google Cloud program workshops and events conducted by GDSC VJTI
Stars: ✭ 13 (-43.48%)
Mutual labels:  gcp
spring-cloud-gcp-guestbook
No description or website provided.
Stars: ✭ 55 (+139.13%)
Mutual labels:  gcp
tf-free
Create cloud-native resources on all the major cloud providers, completely free of charge. This project is currently under heavy development.
Stars: ✭ 107 (+365.22%)
Mutual labels:  gcp
infracost-gh-action
GitHub Action for Infracost. Shows cloud cost estimates for Terraform in pull requests.
Stars: ✭ 119 (+417.39%)
Mutual labels:  gcp
vertex-ai-samples
Sample code and notebooks for Vertex AI, the end-to-end machine learning platform on Google Cloud
Stars: ✭ 270 (+1073.91%)
Mutual labels:  gcp
Bank-Note-Authentication
💸 Authenticate Bank Notes on the basis of Genuity and Forged using Sklearn and deployed on Heroku and FastAPI Server 💳 💲
Stars: ✭ 17 (-26.09%)
Mutual labels:  gcp
argocd-operator-helm
[DEPRECATED] Argo CD Operator (Helm) installs Argo CD in OpenShift and Kubernetes.
Stars: ✭ 18 (-21.74%)
Mutual labels:  gcp

Docker Build Status Docker Pulls Layers Version

Supported tags and respective Dockerfile links

  • latest, 268.0.0 (Dockerfile)
  • from 267.0.0 to 256.0.0 (all listed versions here)

alpine-firestore-backup

Image that performs Firestore backups based on google/cloud-sdk:alpine image.

Why this image

We use a lot of Firebase features like Firestore. But there is no simple way to backup the data.

This image aims to be used inside the Google Cloud Platform to perform backups automatically.

See this article for more information.

Prerequisites

Create a bucket on GCP

Create a GCP coldline bucket and save the name of your bucket.

Create a service account

Create a GCP Service account with the following rights:

  • Cloud Datastore Import Export Admin
  • Storage Admin

Prepare your env variables for Cloud Run

Please fill in the following information:

  • GCLOUD_PROJECT_ID
  • GCLOUD_BUCKET_NAME

3 ways to create your image ready to use on Cloud Run

1. Use the Cloud Run Button

Please give a feedback on this new way to deploy it

For this deployment, the new service account can't be used. Simply grant the default (<project_id>[email protected]) service account with the required roles

Run on Google Cloud

2. Use a public image

You can use the public gcr image available on gcr.io/zenika-hub/alpine-firestore-backup We publish the image in the 4 container registries to be available in the closest region:

  • Global: gcr.io/zenika-hub/alpine-firestore-backup
  • Europe: eu.gcr.io/zenika-hub/alpine-firestore-backup
  • Asia: asia.gcr.io/zenika-hub/alpine-firestore-backup
  • US: us.gcr.io/zenika-hub/alpine-firestore-backup

3. Create your own image

You can also create your own image from the repository to be independant. But you have to maintain the update of your image by yourself.

To do this, clone this repository:

git clone https://github.com/zenika/alpine-firestore-backup.git

Build:

docker image build -t gcr.io/[GCLOUD_PROJECT_ID]/alpine-firestore-backup

Push using Container Registry Authentication:

gcloud auth configure-docker
docker push gcr.io/[GCLOUD_PROJECT_ID]/alpine-firestore-backup

3 ways to set up your Cloud Run service

Cloud Run is a serverless service to automatically serve your containers using http.

1. Use the Cloud Run Button

It will deploy it automatically.

2. Use the CLI

If you're fan of CLI, please use the following command to create your Cloud Run service:

gcloud beta run deploy alpine-firestore-backup\
    --project=my-awesome-project\
    --platform=managed\
    --region=europe-west1\
    --image=zenika-hub/alpine-firestore-backup\
    --memory=256Mi\
    --allow-unauthenticated\
    --set-env-vars GCLOUD_PROJECT_ID=VALUE,GCLOUD_BUCKET_NAME=VALUE\
    --service-account=my-service-account@my-awesome-project.iam.gserviceaccount.com

Check the deployment using the following command:

gcloud beta run services list\
    --project my-awesome-project\
    --platform managed\
    --region=europe-west1\

3. Use the WebUI

In the WebUI console, create a Cloud Run service using the public image gcr.io/zenika-hub/alpine-firestore-backup or your own image gcr.io/[GCLOUD_PROJECT_ID]/alpine-firestore-backup.

Be careful to:

  • Choose your newly image in latest
  • Choose "Cloud Run (fully managed)" and a location
  • Enter a service name
  • Select "Allow unauthenticated invocations"
  • In the "Show optional settings / Environment variables", set the 3 environment variables seen in the previous section
  • In the "Service account" part, select your previously created service account

cloud-run

Test and validate

You can test the service using your browser: https://alpine-firestore-backup-XXX-run.app/

Save the url created to call your Cloud Run Service. For example: https://alpine-firestore-backup-XXX-run.app/backup

Schedule it with Cloud Scheduler

Cloud Scheduler allow you to schedule a cronjob in order to call a https endpoint at regular intervals.

Prepare a Cloud Scheduler to send a request to your Cloud Run Service every time you need.

For example, every Monday at 3:00am 0 3 * * 1

cloud-scheduler

Monitor the backup operations

You can also check the current status of each backup operation using the following url https://alpine-firestore-backup-XXX-run.app/list

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].