Update path to etc/

This commit is contained in:
Pim van Pelt
2025-07-06 17:55:11 +02:00
parent 5385d6fca8
commit 372d7125a1
2 changed files with 14 additions and 14 deletions

View File

@ -26,7 +26,7 @@ make build
1. **Create configuration files**: 1. **Create configuration files**:
**Device types** (`yaml/00-device-types.yaml`): **Device types** (`etc/00-device-types.yaml`):
```yaml ```yaml
types: types:
srlinux: srlinux:
@ -40,7 +40,7 @@ make build
- show running-config - show running-config
``` ```
**Device config** (`yaml/config.yaml`): **Device config** (`etc/config.yaml`):
```yaml ```yaml
devices: devices:
asw100: asw100:
@ -55,13 +55,13 @@ make build
```bash ```bash
# Backup all devices (multiple YAML files are automatically merged) # Backup all devices (multiple YAML files are automatically merged)
ipng-router-backup --yaml yaml/00-device-types.yaml --yaml yaml/config.yaml --output-dir /backup ipng-router-backup --yaml etc/00-device-types.yaml --yaml etc/config.yaml --output-dir /backup
# Or use wildcards # Or use wildcards
ipng-router-backup --yaml yaml/*.yaml --output-dir /backup ipng-router-backup --yaml etc/*.yaml --output-dir /backup
# Backup specific devices # Backup specific devices
ipng-router-backup --yaml yaml/*.yaml --host asw100 --output-dir /backup ipng-router-backup --yaml etc/*.yaml --host asw100 --output-dir /backup
``` ```
3. **Check output**: 3. **Check output**:

View File

@ -102,7 +102,7 @@ The tool automatically merges multiple YAML files using the mergo library. Files
**Example file structure:** **Example file structure:**
``` ```
/etc/ipng-router-backup/ /etc/ipng-router-backup/
├── yaml/ ├── etc/
│ ├── 00-device-types.yaml # Device type definitions (loaded first) │ ├── 00-device-types.yaml # Device type definitions (loaded first)
│ ├── 10-production.yaml # Production device definitions │ ├── 10-production.yaml # Production device definitions
│ ├── 20-staging.yaml # Staging device definitions │ ├── 20-staging.yaml # Staging device definitions
@ -114,12 +114,12 @@ The tool automatically merges multiple YAML files using the mergo library. Files
1. **Load multiple files with automatic merging:** 1. **Load multiple files with automatic merging:**
```bash ```bash
ipng-router-backup --yaml yaml/00-device-types.yaml --yaml yaml/10-production.yaml ipng-router-backup --yaml etc/00-device-types.yaml --yaml etc/10-production.yaml
``` ```
2. **Use wildcards for directory-based loading:** 2. **Use wildcards for directory-based loading:**
```bash ```bash
ipng-router-backup --yaml yaml/*.yaml ipng-router-backup --yaml etc/*.yaml
``` ```
3. **Override configurations per environment:** 3. **Override configurations per environment:**
@ -390,7 +390,7 @@ For large deployments, organize configurations using multiple YAML files with au
**Environment-based structure:** **Environment-based structure:**
```bash ```bash
network-backup/ network-backup/
├── yaml/ ├── etc/
│ ├── 00-device-types.yaml # All device types (loaded first) │ ├── 00-device-types.yaml # All device types (loaded first)
│ ├── 10-common.yaml # Common settings │ ├── 10-common.yaml # Common settings
│ ├── 20-production.yaml # Production devices │ ├── 20-production.yaml # Production devices
@ -403,7 +403,7 @@ network-backup/
└── maintenance.yaml # Maintenance mode settings └── maintenance.yaml # Maintenance mode settings
``` ```
**Device types** (`yaml/00-device-types.yaml`): **Device types** (`etc/00-device-types.yaml`):
```yaml ```yaml
types: types:
srlinux: srlinux:
@ -419,7 +419,7 @@ types:
- show running-config - show running-config
``` ```
**Production devices** (`yaml/20-production.yaml`): **Production devices** (`etc/20-production.yaml`):
```yaml ```yaml
devices: devices:
prod-asw100: prod-asw100:
@ -438,13 +438,13 @@ devices:
**Usage examples:** **Usage examples:**
```bash ```bash
# Load all standard configs # Load all standard configs
ipng-router-backup --yaml yaml/*.yaml ipng-router-backup --yaml etc/*.yaml
# Load with environment-specific overrides # Load with environment-specific overrides
ipng-router-backup --yaml yaml/*.yaml --yaml overrides/emergency.yaml ipng-router-backup --yaml etc/*.yaml --yaml overrides/emergency.yaml
# Load only specific environments # Load only specific environments
ipng-router-backup --yaml yaml/00-device-types.yaml --yaml yaml/20-production.yaml ipng-router-backup --yaml etc/00-device-types.yaml --yaml etc/20-production.yaml
``` ```
### Integration with Git ### Integration with Git