Update README.md

This commit is contained in:
VetheonGames 2023-03-19 17:35:20 -06:00 committed by GitHub
parent 6b2941e3a1
commit 6b2955e48a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,19 +2,13 @@
This Ruby program is designed to perform regular backups of a MySQL database to a local directory, and optionally to a Backblaze B2 cloud storage bucket. This Ruby program is designed to perform regular backups of a MySQL database to a local directory, and optionally to a Backblaze B2 cloud storage bucket.
## Known Issue
Currently the program is not uploading to B2, I'm trying to figure out why, but it's not presenting an error, even with debug code. Please bare with me.
## Installation ## Installation
To use this program, you'll need to run the following: To use this program, you'll need to run the following: (this is not working right now, will update soon)
```bash
wget https://rusql.pixelatedstudios.net/installers/rusql/install.sh && bash ./install.sh
``` ```
wget https://rusql.pixelatedstudios.net/installers/rusql/db-backup.sh && bash ./db-backup.sh
```
## Configuration ## Configuration
@ -24,39 +18,35 @@ When you run the program for the first time, it will prompt you for configuratio
- Backup directory (optional, defaults to the current directory) - Backup directory (optional, defaults to the current directory)
- Backblaze B2 credentials (optional, enables cloud storage backups) - Backblaze B2 credentials (optional, enables cloud storage backups)
## Usage ## Usage
To run the program, simply execute the `starter.rb` file using the following command from inside the cloned directory: To run the program, simply execute the `starter.rb` file using the following command from inside the cloned directory:
``` ```bash
ruby starter.rb ruby starter.rb
``` ```
You can also run this program via Cron. For example, this Crontab would run the program every 6 hours: You can also run this program via Cron. For example, this Crontab would run the program every 6 hours:
``` ```bash
0 */6 * * * /path/to/starter.rb 0 */6 * * * /usr/bin/PixelatedStudios/Ruby/Ru-B2-SQL-Backups/starter.rb
``` ```
This will perform a backup of the MySQL database according to the configuration settings. If Backblaze B2 backups are enabled, the program will upload the backup file to the cloud storage bucket. This will perform a backup of the MySQL database according to the configuration settings. If Backblaze B2 backups are enabled, the program will upload the backup file to the cloud storage bucket.
## Maintenance ## Maintenance
To update the program, simply pull the latest changes from the Git repository and re-run `bundle install` to ensure that any new gems are installed. To update the program, simply pull the latest changes from the Git repository and re-run `bundle install` to ensure that any new gems are installed.
If you need to change the configuration settings, simply delete the `config.json` file and run the program again to be prompted for new configuration details. If you need to change the configuration settings, simply delete the `config.json` file and run the program again to be prompted for new configuration details.
To delete old backups, the program will check for backups that are older than 48 hours and delete them. To modify this time window, edit the `max_age_hours` variable in the `delete_old_backups` method of the `MysqlDatabaseBackup` class. To delete old backups, the program will check for backups that are older than `local_retention_days` days (default 30) and delete them. To modify this time window, edit the `max_age_days` variable in the `delete_old_backups` method of the `MysqlDatabaseBackup` class.
## Compatibility ## Compatibility
This program is compatible with Debian and RHEL based systems, but could be made to work with any systems compatible with Ruby, Python3, and Bash. This program is compatible with Debian and RHEL based systems, but could be made to work with any systems compatible with Ruby, Python3, and Bash.
## Backblaze B2 ## Backblaze B2
Optionally, this program can update (and maintain) your Backblaze B2 bucket. It does this by removing the previous backup from the B2 bucket when it uploads a new one. Optionally, this program can update (and maintain) your Backblaze B2 bucket. It does this by removing the previous backups from the B2 bucket on a configurable timer