feat: update README

This commit is contained in:
Urko 2023-08-27 21:47:13 +02:00
parent 61984470da
commit 3e698d3f43
1 changed files with 19 additions and 2 deletions

View File

@ -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:
@ -95,3 +104,11 @@ The application can also clean up duplicate versions of files in your Backblaze
./bin/backblaze-backup cleanup
```
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.