1d2e9a2448a3ad6baebed75306b1b003fb3f4851
BAMS - Backup Appliance Management System
A comprehensive management system for backup appliances, providing unified control over disk repositories, tape libraries, iSCSI targets, and Bacula integration.
Features
- Dashboard: Real-time monitoring of storage, tape library, iSCSI sessions, and Bacula status
- Disk Repository Management: Create and manage LVM and ZFS repositories
- Tape Library Management: Inventory, load/unload operations for LTO-8 libraries
- iSCSI Target Management: Configure SCST targets with portal and initiator ACL
- Bacula Integration: Status monitoring, config generation, and inventory operations
- Logs & Diagnostics: Live log viewing and support bundle generation
Architecture
- Backend: Go-based REST API service running as systemd service
- Frontend: Cockpit plugin providing web-based UI
- Storage: LVM and ZFS support for disk repositories
- iSCSI: SCST framework for iSCSI target management
- Tape: Support for LTO-8 SAS/FC tape libraries
Requirements
- Ubuntu Server 24.04 LTS
- Go 1.21+
- Cockpit 300+
- SCST (stable)
- Bacula Community/Enterprise
- LTO-8 compatible tape library
Installation
1. Build Backend
cd backend
go mod download
go build -o bams-backend .
sudo cp bams-backend /usr/local/bin/
2. Install Cockpit Plugin
sudo cp -r cockpit /usr/share/cockpit/bams
sudo systemctl restart cockpit
3. Configure System
# Create user and group
sudo useradd -r -s /bin/false bams
sudo groupadd bams-admin
sudo groupadd bams-operator
# Create directories
sudo mkdir -p /var/lib/bams
sudo mkdir -p /etc/bams
sudo mkdir -p /var/log/bams
# Copy configuration
sudo cp configs/config.yaml.example /etc/bams/config.yaml
sudo cp configs/bams.service /etc/systemd/system/
# Install polkit rules
sudo cp configs/polkit.rules /etc/polkit-1/rules.d/50-bams.rules
# Set permissions
sudo chown -R bams:bams /var/lib/bams
sudo chown -R bams:bams /var/log/bams
sudo chmod 640 /etc/bams/config.yaml
4. Start Service
sudo systemctl daemon-reload
sudo systemctl enable bams.service
sudo systemctl start bams.service
Configuration
Edit /etc/bams/config.yaml to customize:
- Port number (default: 8080)
- Log level (debug, info, warn, error)
- Data directory
- SCST and Bacula config paths
- Security settings
Usage
- Access Cockpit web interface
- Navigate to "BAMS" in the tools menu
- Use the dashboard to monitor system status
- Manage storage repositories, tape library, and iSCSI targets through the UI
API Endpoints
The backend provides a REST API at http://localhost:8080/api/v1/:
GET /dashboard- Dashboard summaryGET /disk/repositories- List repositoriesPOST /disk/repositories- Create repositoryGET /tape/library- Library statusPOST /tape/inventory- Run inventoryGET /iscsi/targets- List iSCSI targetsPOST /iscsi/targets- Create targetGET /bacula/status- Bacula SD statusGET /logs/{service}- Get logsGET /diagnostics/bundle- Download support bundle
Security
- Privileged operations require polkit authorization
- Users must be in
bams-adminorbams-operatorgroups - HTTPS/TLS recommended for production
- Audit logging for configuration changes
Troubleshooting
- Check service status:
sudo systemctl status bams - View logs:
sudo journalctl -u bams -f - Verify Cockpit plugin: Check
/usr/share/cockpit/bamsexists - Test API:
curl http://localhost:8080/api/v1/health
License
GPL-3.0
Description
Languages
Markdown
100%