Skip to content

ghimawan0/mybr

Repository files navigation

MyBR a.k.a MySQL Backup and Restore Project

Overview

The MyBR project is a PHP-based application designed to manage and automate database dump and restore processes for eligible projects. It includes features such as project scheduling, database connection management, and secure password handling.

Features

  • Prevents overlapping script executions using a lock file mechanism.
  • Dynamically configurable execution intervals.
  • Secure password encryption and decryption using AES-128-CTR.
  • Automated database dump and restore processes.
  • Error handling and status updates for projects.

File Structure

  • run.php: Main script to execute the scheduler and handle the dump and restore process.
  • Scheduler.php: Contains the core logic for scheduling and database operations.
  • config.php: Configuration file for database connection details.
  • create_tables.sql: SQL script to create necessary database tables.
  • add_project.php, edit_project.php, delete_project.php: Scripts to manage project entries.
  • fetch_project_data.php, fetch_project_details.php: Scripts to fetch project-related data.
  • project_table.php: Handles project table operations.
  • stop.php: Script to stop ongoing processes.

Prerequisites

  • PHP 5.5 or higher
  • MySQL 5.5 or higher
  • OpenSSL extension enabled in PHP

Installation

  1. Clone the repository:
    git clone <repository-url>
  2. Navigate to the project directory:
    cd mybr
  3. Configure the database connection in config.php.
  4. Import the create_tables.sql file into your MySQL database.

Usage

  1. Run the run.php script to start the scheduler:
    php run.php
  2. Use the provided scripts to manage projects and monitor their status.

Security

  • Passwords are encrypted using AES-128-CTR before being stored.
  • Ensure the decryption_key and initialization vector (IV) are kept secure.

Error Handling

  • Errors during execution are logged and the project status is updated accordingly.
  • The lock file is removed after execution to allow subsequent runs.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please submit a pull request or open an issue for any suggestions or improvements.

About

MySQL Backup and Restore

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages