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.
- 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.
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.
- PHP 5.5 or higher
- MySQL 5.5 or higher
- OpenSSL extension enabled in PHP
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd mybr
- Configure the database connection in
config.php
. - Import the
create_tables.sql
file into your MySQL database.
- Run the
run.php
script to start the scheduler:php run.php
- Use the provided scripts to manage projects and monitor their status.
- Passwords are encrypted using AES-128-CTR before being stored.
- Ensure the
decryption_key
and initialization vector (IV) are kept secure.
- Errors during execution are logged and the project status is updated accordingly.
- The lock file is removed after execution to allow subsequent runs.
This project is licensed under the MIT License. See the LICENSE
file for details.
Contributions are welcome! Please submit a pull request or open an issue for any suggestions or improvements.