From 3e698d3f43e73f6a177e831857a0ffa4788647f2 Mon Sep 17 00:00:00 2001 From: Urko Date: Sun, 27 Aug 2023 21:47:13 +0200 Subject: [PATCH] feat: update README --- Readme.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index dc33af4..b5327cc 100644 --- a/Readme.md +++ b/Readme.md @@ -69,9 +69,19 @@ The application uses the following environment variables: - **BB_ID:** Your Backblaze account ID - **BB_KEY:** Your Backblaze application key +- **LOG_LEVEL:** Sets the log level (DEBUG, INFO, WARN, ERROR). Default is INFO. You can set these variables in your environment, or you can use a **.env** file in the root directory of the project. If the **BACKBLAZE_ENV** environment variable is set to dev, the application will load the **.env** file. +## Configurable Logging + +The application supports configurable logging levels. Set the LOG_LEVEL environment variable to one of the following values: + +- **DEBUG:** Detailed debug information +- **INFO:** Informational messages +- **WARN:** Warnings +- **ERROR:** Errors only + ## Syncing with Backblaze The application uses the Sync method of the BackBlaze service to sync files or directories to Backblaze. If there's an error during the sync, the application will log the error and exit. @@ -79,7 +89,6 @@ The application uses the Sync method of the BackBlaze service to sync files or d ./bin/backblaze-backup sync ``` - ## Checking for Duplicate Versions The application can also check for duplicate versions of files in your Backblaze buckets. To do this, run the following command: @@ -94,4 +103,12 @@ The application can also clean up duplicate versions of files in your Backblaze ```bash ./bin/backblaze-backup cleanup ``` -If there are any errors during the cleanup, the application will log them and exit. \ No newline at end of file +If there are any errors during the cleanup, the application will log them and exit. + +## Check discrepancy between local backup and B2 +The application can also check that all local files has been backed up into B2 cloud. To do this, run the following command: + +```bash +./bin/backblaze-backup check --dir "/var/tmp/test-upload" --bucket "b2-bucket" +``` +If there are any errors during the check, the application will log them and exit. \ No newline at end of file