This project is designed to update invalid records in the Backblaze drive statistics database. It connects to a MariaDB database, performs various data updates, and outputs the results to CSV files.
- R environment with the following packages installed:
RMariaDBtictocyaml
The project uses a configuration file config.yml to store database connection details. A sample configuration file config.sample.yml is provided as a template. You need to create a config.yml file with your database credentials:
db_connection:
username: your_username
password: your_password
host: your_host
port: your_port
dbname: your_dbname- Ensure that the required directories (
outfile,infile,tmp) exist. The script will create them if they are missing. - Run the
update_invalid_record.Rscript using R or RStudio. - The script will:
- Connect to the MariaDB database using the credentials provided in
config.yml. - Perform various SQL updates to correct invalid records in the
drive_statstable. - Output initial and final status reports to CSV files in the
outfiledirectory.
- Connect to the MariaDB database using the credentials provided in
The script generates several CSV files in the outfile directory, including:
- Initial and final status reports of the
drive_statstable. - A report of records with invalid capacity values.
This project is licensed under the MIT License.