This commit is contained in:
first 2025-07-07 02:24:01 +00:00
parent b02c9f0246
commit 80b541c621

View file

@ -101,7 +101,7 @@ Due to modern Linux protections (`externally-managed-environment`), you have two
#### Script Arguments
The `backup_openwebui.py` script is configured via command-line arguments:
The `regularbm.py` script is configured via command-line arguments:
- `--s3-bucket` (Required): The name of your S3 bucket.
- `--s3-region` (Required): The AWS region of your S3 bucket (e.g., `us-east-1`).
@ -111,14 +111,14 @@ The `backup_openwebui.py` script is configured via command-line arguments:
#### Manual Execution
Make the script executable (`chmod +x backup_openwebui.py`) and run it manually for testing:
Make the script executable (`chmod +x regularbm.py`) and run it manually for testing:
```bash
# Basic usage
./backup_openwebui.py --s3-bucket "your-backup-bucket" --s3-region "us-west-2"
./regularbm.py --s3-bucket "your-backup-bucket" --s3-region "us-west-2"
# With custom parameters
./backup_openwebui.py \
./regularbm.py \
--s3-bucket "your-backup-bucket" \
--s3-region "us-west-2" \
--container-name "my-custom-webui" \
@ -134,13 +134,13 @@ Schedule the script for automated execution using `cron`.
**Example Cron Job (runs daily at 09:00 UTC):**
```crontab
0 9 * * * /path/to/script/venv/bin/python /path/to/script/backup_openwebui.py --s3-bucket "your-bucket" --s3-region "us-east-1" --s3-prefix "your-prefix/" >> /var/log/regularbm.log 2>&1
0 9 * * * /path/to/script/venv/bin/python /path/to/script/regularbm.py --s3-bucket "your-bucket" --s3-region "us-east-1" --s3-prefix "your-prefix/" >> /var/log/regularbm.log 2>&1
```
**Explanation of the cron line:**
- `0 9 * * *`: The schedule (minute 0, hour 9, every day).
- `/path/to/script/.../python`: Absolute path to the Python interpreter. Use `/usr/bin/python3` for the OS-native install or the path to your `venv` interpreter.
- `/path/to/script/.../backup_openwebui.py`: Absolute path to the backup script.
- `/path/to/script/.../regularbm.py`: Absolute path to the backup script.
- `--s3-bucket ...`: Your required script arguments.
- `>> /var/log/regularbm.log 2>&1`: **Highly recommended.** Redirects all output and errors to a log file for debugging.