sugiro.ai
EN BR
Open navigation
EN BR
home
ai projects bitcoin calculator capital gains calculator card tracker dots animation tool glossary builder hash cost calculator prompt builder QR code generator rock drive backup short URL tech stacks
generative design about me contact
QR Code Generator Short URL
Tech Stack Review

Rock Drive Backup

Beta version: still testing. Code is in private repository.

A WordPress plugin for full file and database backups to a plugin-created Google Drive folder, with one-click same-site restore. It is built in dependency-free PHP with a staged job engine, resumable Drive uploads, SHA-256 manifest verification, weekly scheduled backups with retention and email notifications, and database and file rollback.

Live at: private repository

Rock Drive Backup project screenshot

Overview

Type WordPress backup plugin
Language PHP 7.2+ (no external dependencies)
Admin UI Vanilla JavaScript + CSS
Storage Google Drive API v3, OAuth 2.0
Scheduling WP-Cron weekly + retention
Security AES-256-GCM encrypted credentials
Integrity SHA-256 manifest verification
Database Custom jobs + logs tables
License GPL-2.0-or-later

Main Stack

What powers the backup plugin and how backup jobs move from the WordPress admin to Google Drive.

Platform

WordPress plugin (6.5+)

The product installs as a standard WordPress plugin with a top-level Drive Backup admin screen, activation hooks that create its own database tables, and WP-Cron powering job execution and weekly schedules.

Language

Dependency-free PHP

Around 3,100 lines of PHP 7.2+ across ten focused classes, with polyfills for newer string helpers, no Composer packages, no Google SDK, and a vanilla JavaScript and CSS admin interface.

Drive integration

Google Drive API v3, direct REST

OAuth 2.0 with the narrow drive.file scope (the plugin can only see folders and files it creates itself), resumable uploads and downloads, and raw REST calls through the WordPress HTTP API.

Safe restore

One-click restore with rollback

Same-site restore guarded by administrator password confirmation and maintenance mode. Every artifact is downloaded and verified before anything changes, files are extracted into private staging, and database plus changed-file rollback data is created first.

Integrity & security

SHA-256 manifests, encrypted secrets

Every backup artifact is hashed into a SHA-256 manifest and verified after upload and before restore. OAuth tokens and the client secret are encrypted with AES-256-GCM using keys derived from the WordPress salts.

AI QA harness

Agent-driven restore QA

The repository ships a project-local agent skill that validates restore integrity before changes are trusted: percent-sign round-trips, permalink structures, serialized PHP data, and Gutenberg column styles, checked with deterministic scan scripts.

How It Runs

Backups and restores are long-running jobs, so the plugin advances them one small stage at a time instead of one fragile request.

1

The admin screen collects setup and actions

templates/admin-page.php holds the Google connection status, backup folder, Back Up Now button, weekly schedule settings, and the list of restorable backups.

2

Actions become queued jobs

class-rdb-repository.php creates each backup or restore as a row in a custom jobs table with a UUID, status, stage, and progress, alongside a logs table.

3

A locked runner steps jobs forward

class-rdb-job-runner.php runs every minute via WP-Cron, acquires a lock, and advances the current job by exactly one stage, so long jobs survive PHP time limits and can resume.

4

Backup stages produce verified artifacts

class-rdb-backup-engine.php moves through preflight, database dump, file scan, multi-volume archiving, resumable upload, manifest build, and verification.

5

Restore stages protect the live site

class-rdb-restore-engine.php downloads and verifies the manifest and artifacts, extracts into staging, snapshots the database and changed files for rollback, then copies files and imports the database.

Architecture Map

The plugin is a small set of final classes wired together in one plugin class, with both engines built as step machines over a shared repository.

Key folders and files
rock-drive-backup.phpBootstrap file with the PHP version floor, polyfills, and plugin metadata.
includes/Ten classes: plugin wiring, admin screen, backup engine, restore engine, Google Drive client, job runner, scheduler, repository, crypto, and activator.
templates/The single Drive Backup admin page.
assets/Vanilla admin JavaScript and CSS.
uninstall.phpCleanup when the plugin is deleted.
Architecture Analysis
rock-drive-backup.php
uninstall.php
readme.txt

includes/class-rdb-plugin.php
includes/class-rdb-admin.php
includes/class-rdb-backup-engine.php
includes/class-rdb-restore-engine.php
includes/class-rdb-google-drive.php
includes/class-rdb-job-runner.php
includes/class-rdb-scheduler.php
includes/class-rdb-repository.php
includes/class-rdb-crypto.php
includes/class-rdb-activator.php

templates/admin-page.php
assets/admin.js
assets/admin.css

The design keeps every concern in one obvious place: engines only know stages, the repository owns job state, the Drive client owns OAuth and uploads, and the scheduler reuses the same job pipeline for weekly runs with retention pruning and email summaries.

Backup and Restore Layer

The plugin backs up the whole site and treats restore as the dangerous operation it is, verifying first and keeping a way back.

Backup scope

Full files plus logical database dumps

The WordPress root is archived: core, plugins, themes, uploads, must-use plugins, and root configuration files.

The database is exported as a full logical dump.

Multiple sites can share one main Drive folder, each writing only into its own site-label subfolder.

Weekly scheduled backups prune older backups per site and send an email summary of each run.

Restore safety

Same-site restore with a way back

Restore is limited to the same WordPress home URL; it is not a migration tool.

Every artifact is verified against the SHA-256 manifest before anything is touched.

Current wp-config.php credentials and the active job and log tables are preserved through the database import.

Database and changed-file rollback data is created before changes, so a failed restore can be undone.

Install & Requirements

There is no build step and no Composer install; the plugin folder is the deliverable.

Install
wp-content/plugins/
└── rock-drive-backup/
    ├── rock-drive-backup.php
    ├── includes/
    ├── assets/
    ├── templates/
    └── uninstall.php

Copy the folder into wp-content/plugins (or upload it as a zip), activate, then connect a Google OAuth client and account from the Drive Backup admin screen.

Requirements

What the plugin expects

RDB_PRIVATE_DIR optionally set in wp-config.php to choose a private writable directory for staging and rollback data outside the web root.

PHP 7.2+ with ZipArchive, OpenSSL, cURL, JSON, and zlib, served over HTTPS.

A Google Cloud OAuth 2.0 client (web application) with the Drive API enabled, pasted into the settings screen.

A working WP-Cron runner, since backups, restores, and weekly schedules all execute through it.

Bottom Line

Rock Drive Backup is a dependency-free WordPress backup plugin with a staged, resumable job engine. It backs up files and database to a plugin-created Google Drive folder, verifies every artifact with SHA-256 manifests, and restores the same site behind password confirmation with database and file rollback.

2026 Lula Rocha. Almost all rights reserved.