Skip to content

Repository files navigation

Sysadmin Backup & Reporting Worker

Hi Future Developer,

Welcome to the Sysadmin Backup & Reporting Worker! This project is a Python-based utility worker designed to handle automated system backups (directories and databases), calculate SHA-256 checksums, sync backups to Cloudflare R2 / S3-compatible cloud storage, and report execution status back to a central management API (such as personal-v4).

Note: This repository works autonomously as a client worker, polling the central API for pending backup schedules, generating zip archives, uploading cloud backups, and reporting completion results seamlessly.

Dazzling Tech Stack

Admin Panel Dashboard (personal-v4 Integration)

The backup worker communicates directly with the personal-v4 Admin Panel, where backup schedules, retention policies, excluded files, and sync configurations are centrally managed.

Backup Schedules Overview

Backup Schedules Dark Mode

Backup Schedules Light Mode

Manage and monitor all backup schedules with real-time status, size tracking, and execution intervals in both dark and light modes.

Schedule & Backup Configuration

Create Backup Schedule Dark Mode

Create Backup Schedule Light Mode

Configure source paths, target patterns, file/directory exclusion lists, local retention flags (keep_local_backup), and cloud sync settings (is_sync_cloud).

Core Features & Workflow

  • Automated Schedule Checking: Polling central API endpoint (/check-schedule) to retrieve active pending backup tasks.
  • Flexible Backup Types: Supports directory (Files) zip compression and database backups (SQL Server, MySQL).
  • Exclusion Filters: Exclude specific temporary or heavy files/folders using wildcard patterns.
  • Checksum Verification: Generates SHA-256 hash for archive verification and data integrity.
  • Cloud Storage Sync: Direct upload to Cloudflare R2 / S3 storage with custom cloud destination paths.
  • Local Retention Management: Optional automatic cleanup of local backup archives after successful cloud upload.
  • Execution Reporting: Reports execution details, backup sizes, error messages, and backup_job_id back to central API (/store).

Quick Start & Setup

Prerequisites

  • Python 3.10+
  • Virtual environment (venv)

Installation

# Clone repository
git clone https://github.com/novaardiansyah/sysadmin.git
cd sysadmin

# Create & activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
# Or using Makefile
make install

Environment Configuration

Create .env file based on .env.example:

API_URL=https://your-api-domain.com/api
API_KEY=your_secret_api_key
BACKUP_OUTPUT=backups

R2_ENABLED=true
R2_ACCOUNT_ID=your_account_id
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
R2_BUCKET_NAME=your_bucket_name
R2_ENDPOINT_URL=https://<account_id>.r2.cloudflarestorage.com

Running the Backup Worker

python app.py
# Or using Makefile
make run

Related Repositories

This project works in tandem with:

Credentials & Environment

While this repository is public, please note that all forms of credentials, API keys (including .env), and environment configurations are not provided for the public. Access to production systems and sensitive configurations remains restricted for security reasons.

Let's Connect

Need to chat? Feel free to drop me a line via Email or hit me up on WhatsApp. I'm just a message away, ready to groove with you!

Project Status

stages Python Cloudflare R2 size license last commit

Code of Conduct

We believe in fostering a welcoming and inclusive environment for everyone. Please be respectful, considerate, and constructive in all interactions. Let's collaborate and make this community awesome together!

Licensing Groove

Exciting news! This project is grooving to the rhythm of the MIT License.

Feel free to use, modify, and share it with the world. Just remember to keep the original license intact. Let's spread the joy of coding together!


Happy coding and collaborating!
— Nova Ardiansyah

About

Python System Admin

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages