Kubesync is an automated backup service designed to securely back up selected directories and their subdirectories to Google Drive. This service runs every day at midnight by default, but both the backup time and the target directory can be customized to fit your needs.
- Automated Backups: Schedules daily backups to Google Drive at midnight.
- Customizable: Easily change the backup time and target directory.
- Secure Authentication: Uses OAuth2 for secure access to Google Drive.
- Containerized: Runs seamlessly in a Docker container.
- Scalable: Managed with Kubernetes and CronJob for efficient scaling and reliability.
- Python: Core programming language for the application.
- Docker: Containerization for easy deployment and scaling.
- Kubernetes (K8s): Orchestration platform for managing containers.
- CronJob: Scheduling tasks within Kubernetes.
- Google Drive API: Interface for interacting with Google Drive.
- OAuth2: Secure authentication for Google Drive access.
- Docker
- Kubernetes cluster
- Google Cloud project with Drive API enabled
- OAuth2 credentials (client ID and secret)
-
Clone the repository:
git clone https://github.com/yourusername/kubesync.git cd kubesync -
Start kubernetes service
minikube start
-
Choose backup folder
Choose the backup folder using the edityaml.py script. This script takes care of creating the docker file with the required folders.python3 edityaml.py
-
Start Cronjob
kubectl apply -f final_cron.yaml
kubectl delete cronjob backup3-cronjobThis project is licensed under the MIT License. See the LICENSE file for details.