Version-controlled infrastructure configuration for TrueNAS Scale storage environment.
## Overview
This repository contains configuration files, scripts, and documentation for managing a TrueNAS Scale 25.04.2.6 storage server. The system uses API-based collection to capture infrastructure state, enabling disaster recovery planning and configuration management.
## Infrastructure Components
### TrueNAS Host
- **Host**: 192.168.2.150
- **Version**: TrueNAS-SCALE-25.04.2.6
- **Architecture**: Single-node storage server
- **Primary Use**: Network-attached storage, media server
### Storage Pools
- **Vauly**: ZFS mirror pool (primary storage)
- Status: Monitor via `disaster-recovery/truenas-exports/exports/storage/pools.json`
### Sharing Services
- **NFS**: Network File System shares for Unix/Linux clients
- **SMB**: Samba/CIFS shares for Windows compatibility
- **iSCSI**: Block-level storage targets for advanced use cases
## Repository Structure
```
truenas/
├── scripts/ # Collection and utility scripts
│ └── collect-truenas-config.sh # Main API-based collection (v1.1.0)
- **[START-HERE-DOCS/TRUENAS_COLLECTION_README.md](START-HERE-DOCS/TRUENAS_COLLECTION_README.md)**: Complete collection system documentation
- **[START-HERE-DOCS/TRUENAS_API_REFERENCE.md](START-HERE-DOCS/TRUENAS_API_REFERENCE.md)**: API v2.0 endpoint reference
## Security Notes
### API Key Management
- API keys provide full access to TrueNAS API
- Store securely (environment variables, password managers)
- Never commit API keys to version control
- Rotate keys periodically
- Use dedicated keys for automation
### Data Sensitivity
- Exports contain: IP addresses, hostnames, user accounts, share paths
- Review exports before sharing publicly
- Consider sanitizing sensitive data for external distribution
- User passwords are never collected (TrueNAS API doesn't expose them)
### SSL Certificates
- TrueNAS uses self-signed certificates by default
- Collection script uses `--insecure` flag for curl
- Consider installing proper SSL certificates for production
## Disaster Recovery
### Configuration Exports
- Timestamped snapshots in `disaster-recovery/`
- JSON format for programmatic access
- Human-readable SUMMARY.md for quick review
- Compressed archives for efficient storage
### Recovery Process
1. Review latest export in `disaster-recovery/truenas-exports/`
2. Reinstall TrueNAS Scale on new hardware
3. Recreate storage pools using pool topology from exports
4. Restore shares, services, and tasks from JSON configs
5. Reimport datasets from backup storage
**Note**: Exports contain *configurations*, not *data*. Actual data recovery requires separate backup strategy (snapshots, replication, external backups).
## Backup Strategy
**Configuration Backups** (this repository):
- Automated via collection scripts
- Version-controlled with git
- Stored in disaster-recovery/ directory
- Run weekly or after significant changes
**Data Backups** (separate process):
- ZFS snapshots for local protection
- Replication to remote TrueNAS or backup server
- Cloud sync for critical data
- Regular testing of restore procedures
## Integration with Homelab
This TrueNAS repository complements the Proxmox homelab infrastructure: