Setup a scheduled workflow to backup a Database every 12 hours
The goal of this project is to set up a scheduled workflow to back up a Database every 12 hours and upload the backup to Cloudflare R2, which has a free tier for storage.
The prerequisite for this project is to have a server set up and a database ready to back up. You can use one of the projects did in the other project. Alternatively:
Set up a server on Digital Ocean or any other provider
Run a MongoDB instance on the server
Seed some data into the database
Once you have a server and a database ready, you can proceed to the next step.
You can do this bit either by setting up a cron job on the server or setting up a scheduled workflow in Github Actions that runs every 12 hours and executes the backup from there. The database should be backed up into a tarball and uploaded to Clouodflare R2.
Hint: You can use the mongodump to dump the database and then use aws cli to upload the file to R2.
Write a script to download the latest backup from R2 and restore the database.
Database backups are essential to ensure that you can restore your data in case of a disaster. This project will give you hands-on experience on how to set up a scheduled workflow to back up a database and how to restore it from a backup.
Join the Community
roadmap.sh is the 6th most starred project on GitHub and is visited by hundreds of thousands of developers every month.
Roadmaps Best Practices Guides Videos FAQs YouTube
roadmap.sh by @kamrify @kamrify
Community created roadmaps, best practices, projects, articles, resources and journeys to help you choose your path and grow in your career.
Login or Signup
You must be logged in to perform this action.