Skip to content

MeshCold/GCPBackupAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Backup & Restore System (with Google Drive Integration)

This project is a Flask-based web application that automates the process of creating and uploading backups to Google Drive. It provides a clean dashboard to create, view, and manage backup files, all from a local or cloud environment.


Project Overview

The system allows users to back up important data automatically, compress it into .zip format, and upload it directly to Google Drive. Each backup is stored locally and remotely, and its details (name, size, date, and Drive link) are saved in a SQLite database.

The project demonstrates practical IT automation and integration with Google APIs, suitable for cloud, infrastructure, and DevOps learning purposes.


Features

  • One-click backup creation via a web dashboard
  • Automatic file compression (.zip)
  • Google Drive upload integration via PyDrive2
  • Local backup storage under /backups/
  • Backup history tracking in SQLite
  • Real-time notifications on backup completion
  • Simple and modern TailwindCSS interface

Folder Structure

GCP_Backup/ ├── app.py # Flask web server ├── backup.py # Handles backup creation and Google Drive upload ├── backups.db # SQLite database (auto-generated) ├── client_secrets.json # Google API credentials file ├── mycreds.txt # OAuth token (auto-generated after first login) │ ├── backups/ # Stores compressed backup files ├── data/ # Contains the files/folders to be backed up ├── templates/ # Contains HTML templates │ └── index.html └── pycache/ # Python cache folder


Installation & Setup

Clone the Repository


#Install Dependencies

pip install flask pydrive2 schedule

#Add Google Drive API Credentials client_secrets.json

#Authenticate Google Drive Run the Python shell: python from backup import init_drive init_drive()

#Running the Application Running the Application Then open: http://127.0.0.1:5000 Click “Backup Now” to create a new backup.

#Example Workflow

Add files to the data/ folder

Run the application

Press “Backup Now” in the web UI

A new .zip file appears in /backups/ and uploads to your Google Drive

The backup entry is recorded in backups.db and shown in the dashboard

#Technologies Used

Python Flask – Web framework

PyDrive2 – Google Drive integration

SQLite – Local database for logs

TailwindCSS – Responsive dashboard design

ZipFile / OS / Datetime – Backup automation utilities

About

Flask-based cloud backup automation tool that compresses local data and uploads it to Google Drive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published