Allow creation of machine specific configs.
This commit is contained in:
17
README.md
17
README.md
@@ -32,7 +32,20 @@ After installation, you can run the `backup` command from any directory.
|
||||
|
||||
## Configuration
|
||||
|
||||
Create new backup jobs by adding JSON configuration files to the `configs/` directory. Each configuration file should include:
|
||||
The `configs/` directory contains JSON configuration files for your backup jobs. The repository includes an example config file (`example-config.json`) that you can use as a template.
|
||||
|
||||
> **Important:** All config files except `example-config.json` are ignored by git. This allows you to have different configurations on different machines without affecting other installations.
|
||||
|
||||
To get started, copy the example file to create your own configuration:
|
||||
```bash
|
||||
# Copy example to create your own config
|
||||
cp configs/example-config.json configs/my-backup.json
|
||||
|
||||
# Edit your new config file with your favorite editor
|
||||
nano configs/my-backup.json
|
||||
```
|
||||
|
||||
Each configuration file should include:
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
@@ -74,6 +87,8 @@ backup
|
||||
./backup.py
|
||||
```
|
||||
|
||||
When executed, the script will process all JSON files in the `configs/` directory (except the example file), creating backups as specified in each configuration. If no valid config files are found, it will provide instructions for creating one.
|
||||
|
||||
### Scheduled Execution (Linux)
|
||||
|
||||
Add a cron job to run backups automatically, for example weekly on Saturday at 1:05 AM:
|
||||
|
||||
Reference in New Issue
Block a user