Mikyhost Backup Manager – Documentation

Welcome to the official documentation for Mikyhost Backup Manager V1.0. This guide will walk you through the installation, configuration, and advanced features of the ultimate disaster recovery system for WHMCS.


1. System Requirements

Before installing the module, ensure your server meets the following requirements:

  • WHMCS Version: V7.9 or later
  • PHP Version: PHP 7.4, 8.1, or 8.3
  • PHP Extensions Required: zip, curl, pdo, mbstring
  • Execution Time: A minimum of max_execution_time = 120 is recommended, though the module features an internal bypass for long processes

2. Installation Guide

  1. Download the Module
    Extract the downloaded .zip file from Mikyhost.
  2. Upload to Server
    Upload the mikyhost_backup_manager folder to your WHMCS directory:
    WHMCS_ROOT/modules/addons/
  3. Activate the Module
    • Log in to your WHMCS Admin Dashboard
    • Navigate to System Settings > Addon Modules
    • Locate Mikyhost Backup Manager and click Activate
    • Click Configure, select the Admin Role Groups that should have access (e.g., Full Administrator), and click Save Changes
  4. Access the Dashboard
    Go to Addons > Mikyhost Backup Manager from the top WHMCS menu

Note
Upon activation, the module automatically generates a WHMCS Email Template named "Mikyhost Backup Notification" which you can edit under System Settings > Email Templates


3. Configuration & Setup

A. Storage Setting (Connecting your Cloud)

  1. Go to the General Setting > Storage Setting tab
  2. Select your Primary Storage Provider (e.g., AWS S3, Cloudflare R2, Google Drive, FTP, etc.)
  3. Enter your API credentials (Access Key, Secret Key, Bucket Name, and Endpoint if required)
  4. (Optional) Select a Secondary Storage Provider for Dual-Replication. The system will automatically upload a second copy to this location
  5. Click Save Settings and then click Test Connection to ensure your credentials are correct

Cloud Drives (Google Drive / Dropbox)
After entering your Client ID and Secret, you MUST click the Authorize button to generate an OAuth 2.0 token


B. Performance Tuning (Zero-Crash Architecture)

To ensure backups do not crash your server, navigate to the Performance tab:

  • Chunk Size (MB): Set to 5 or 10. This splits massive uploads into smaller parts to prevent network timeouts
  • Database Engine: Choose Native mysqldump for lightning-fast speeds (requires exec() enabled on your server), or PHP PDO Loop as a safe fallback
  • CPU Throttling: Enable this if you are on a strict Shared Hosting environment to prevent CPU spikes during the ZIP compression

C. Security (AES-256 Encryption)

Under the Security tab, you can enable AES-256 Encryption. Enter a strong password. This password will be used to lock your ZIP archives before they are uploaded to the cloud.

⚠️ CRITICAL
Do not lose this password! We cannot recover it, and you will not be able to extract your backups without it


D. Auto-Pruning (Retention Policy)

Under the Pruning tab, set the Retention Policy (Days). For example, entering 30 means any backup older than 30 days will be automatically deleted from your cloud storage to save space.


4. Setting up Smart Backup Automation (Cron Job)

To automate your backups without doing it manually:

  1. Navigate to the Cronjob tab
  2. Select your desired Smart Backup Frequency (e.g., Daily, Every 12 Hours, Weekly)
  3. Click Save Frequency
  4. Copy the Standard CLI Command or Wget Command provided at the bottom of the page
  5. Paste this command into your server's Cron Job manager (cPanel or Plesk) and set it to run every 5 minutes (*/5 * * * *)

Don't worry, the script will only execute a backup when your selected frequency timeframe has been reached.


5. Setting Up Cloud Drives (Google Drive & Dropbox)

Mikyhost Backup Manager natively supports modern OAuth 2.0 authorization for seamless integration with Google Drive and Dropbox.

Follow these step-by-step instructions to connect your cloud drives.


A. How to Setup Google Drive (OAuth 2.0)

To use Google Drive, you must create an App in your Google Cloud account to generate the necessary API credentials.

  1. Create a Google Cloud Project
  2. Enable the Google Drive API
    • Navigate to APIs & Services > Library
    • Search for "Google Drive API" and click Enable
  3. Configure the OAuth Consent Screen
    • Go to APIs & Services > OAuth consent screen
    • Select External (or Internal if you are a G-Workspace user) and click Create
    • Fill in the required App Information (App name, support email, etc.) and Save
    • Note: While in "Testing" mode, ensure you add your own Google email address under the "Test Users" section
  4. Generate Credentials
    • Go to APIs & Services > Credentials
    • Click Create Credentials > OAuth client ID
    • Select Web application as the Application type
    • Under Authorized redirect URIs, click "Add URI" and paste the exact Redirect URI shown at the bottom of the Google Drive settings inside your Mikyhost Backup Manager dashboard
    • (e.g., https://yourdomain.com/admin/addonmodules.php?module=mikyhost_backup_manager)
    • Click Create
  5. Connect to WHMCS
    • Copy the generated Client ID and Client Secret
    • Paste them into your Mikyhost Backup Manager Storage Setting tab
    • IMPORTANT: Click "Save Settings" first
    • After saving, click the "Authorize with Google" button
    • You will be redirected to Google to grant access
    • Once successful, the status will change to "Authorized"

B. How to Setup Dropbox (OAuth 2.0)

To use Dropbox, you must create a Scoped App in your Dropbox Developer account.

  1. Create a Dropbox App
    • Go to the Dropbox App Console
    • Click "Create app"
    • Choose "Scoped access"
    • Choose the type of access: "App folder" (recommended for security) or "Full Dropbox"
    • Name your app (e.g., WHMCS Backup System) and click Create
  2. Configure Permissions
    • In your App Settings page, go to the Permissions tab
    • Under the Files and folders category, check the boxes for:
      • files.metadata.write
      • files.metadata.read
      • files.content.write
      • files.content.read
    • Click Submit at the bottom of the page to save the permissions
  3. Set the Redirect URI
    • Go back to the Settings tab
    • Scroll down to the OAuth 2 section
    • Under Redirect URIs, paste the exact Redirect URI shown at the bottom of the Dropbox settings inside your Mikyhost Backup Manager dashboard
    • Click Add
  4. Connect to WHMCS
    • Scroll up to copy your App Key and App Secret
    • Paste them into your Mikyhost Backup Manager Storage Setting tab
    • IMPORTANT: Click "Save Settings" first
    • After saving, click the "Authorize with Dropbox" button
    • You will be redirected to Dropbox to grant access
    • Once successful, the status will change to "Authorized"

6. Advanced Features

DB Optimizer & Deep Clean Logs

Over time, WHMCS accumulates gigabytes of system logs. Navigate to the DB Optimizer tab:

  • Optimize Database: Click this to run an OPTIMIZE TABLE command safely on your database to defragment it
  • Deep Clean Logs: Select outdated log tables (like tblactivitylog or tblticketlog) and truncate them before running a backup to drastically reduce your backup size

File Manager & 1-Click Restore

Go to the File Manager tab to view all your stored backups:

  • Click the Download icon to securely pull an archive from the cloud to your local computer
  • Click the Restore icon to perform an automated rollback. The system will download the archive, extract it, and overwrite your database/files seamlessly

7. Troubleshooting & Diagnostics

If your backup fails or hangs, Mikyhost Backup Manager includes a Smart Fatal Error Catcher:

  1. Check the Recent Activity Logs on the Dashboard tab
  2. If the progress hangs, navigate to your WHMCS System Settings > System Logs > Activity Log
  3. The module automatically writes any memory limits, connection timeouts, or locked file errors here
    (e.g., "Mikyhost Backup Manager Fatal Error: Allowed memory size exhausted...")
  4. Common Fix: If you experience memory issues on strict Windows/XAMPP servers, ensure your Chunk Size is small, or check the Diagnostics tab to ensure your PHP Memory Limit is at least 256M
Kas see vastus oli kasulik? 0 Kasutajad peavad seda kasulikuks (0 Hääled)