add bacula installation docs
This commit is contained in:
468
docs/alpha/INFRASTRUCTURE-REVIEW.md
Normal file
468
docs/alpha/INFRASTRUCTURE-REVIEW.md
Normal file
@@ -0,0 +1,468 @@
|
||||
# Infrastructure & Environment Review
|
||||
## AtlasOS - Calypso Backup Appliance
|
||||
|
||||
**Review Date:** 2025-01-XX
|
||||
**Reviewer:** Development Team
|
||||
**Status:** In Progress
|
||||
|
||||
---
|
||||
|
||||
## Executive Summary
|
||||
|
||||
This document reviews the current infrastructure and environment implementation against the `Calypso_System_Architecture.md` specification. The review identifies alignment, gaps, and recommendations for improvement.
|
||||
|
||||
**Overall Status:** ✅ **Mostly Aligned** with minor deviations
|
||||
|
||||
---
|
||||
|
||||
## 1. Architecture Alignment Review
|
||||
|
||||
### 1.1 High-Level Architecture ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Single-node appliance
|
||||
- Control plane orchestrates storage, backup, object storage, tape, and iSCSI
|
||||
- Unified API and UI
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Single-node deployment model
|
||||
- ✅ Go-based API (Calypso Control Plane)
|
||||
- ✅ React-based UI
|
||||
- ✅ Unified API endpoints for all subsystems
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
### 1.2 Deployment Model ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Single-node deployment
|
||||
- Bare metal or VM (bare metal recommended)
|
||||
- Linux-based OS (LTS)
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Single-node deployment
|
||||
- ✅ Ubuntu 24.04 LTS (as per install script)
|
||||
- ✅ Systemd service management
|
||||
- ✅ Supports both bare metal and VM
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
## 2. Filesystem Architecture Review
|
||||
|
||||
### 2.1 Domain Separation ⚠️ **PARTIALLY ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
```
|
||||
Domain | Location
|
||||
----------------|------------------
|
||||
Binaries | /opt/adastra/calypso
|
||||
Configuration | /etc/calypso
|
||||
Data (ZFS) | /srv/calypso
|
||||
Logs | /var/log/calypso
|
||||
Runtime | /var/lib/calypso, /run/calypso
|
||||
```
|
||||
|
||||
**Current Implementation:**
|
||||
- ⚠️ **Binaries**: Currently in `/development/calypso/backend/bin/` (development) or systemd service path
|
||||
- ⚠️ **Configuration**: Uses `/etc/calypso/config.yaml` (as per main.go flag default) ✅
|
||||
- ⚠️ **Data**: Not explicitly organized under `/srv/calypso/` structure
|
||||
- ⚠️ **Logs**: Not explicitly organized under `/var/log/calypso/`
|
||||
- ⚠️ **Runtime**: Not explicitly organized under `/var/lib/calypso/` or `/run/calypso/`
|
||||
|
||||
**Gaps Identified:**
|
||||
1. Binary deployment structure not following `/opt/adastra/calypso/releases/` pattern
|
||||
2. Data directory structure not organized per spec
|
||||
3. Log directory structure not organized per spec
|
||||
4. Runtime directory structure not organized per spec
|
||||
|
||||
**Recommendations:**
|
||||
- [ ] Create deployment script to organize binaries per spec
|
||||
- [ ] Create data directory structure under `/srv/calypso/`
|
||||
- [ ] Configure logging to use `/var/log/calypso/`
|
||||
- [ ] Configure runtime directories
|
||||
|
||||
**Status:** ⚠️ **PARTIALLY ALIGNED** - Structure exists but not fully organized per spec
|
||||
|
||||
---
|
||||
|
||||
### 2.2 Binary Layout ⚠️ **NOT ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
```
|
||||
/opt/adastra/calypso/
|
||||
releases/
|
||||
1.0.0/
|
||||
bin/
|
||||
web/
|
||||
migrations/
|
||||
scripts/
|
||||
current -> releases/1.0.0
|
||||
third_party/
|
||||
```
|
||||
|
||||
**Current Implementation:**
|
||||
- ❌ Binaries in `backend/bin/calypso-api` (development)
|
||||
- ❌ No versioned release structure
|
||||
- ❌ No symlink to current version
|
||||
- ❌ Frontend built to `frontend/dist/` (not organized per spec)
|
||||
|
||||
**Gaps Identified:**
|
||||
1. No versioned release structure
|
||||
2. No symlink mechanism for atomic upgrades
|
||||
3. Frontend assets not organized per spec
|
||||
|
||||
**Recommendations:**
|
||||
- [ ] Create release packaging script
|
||||
- [ ] Implement versioned release structure
|
||||
- [ ] Create symlink mechanism for atomic upgrades
|
||||
- [ ] Organize frontend assets per spec
|
||||
|
||||
**Status:** ❌ **NOT ALIGNED** - Needs implementation
|
||||
|
||||
---
|
||||
|
||||
### 2.3 Configuration Layout ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
```
|
||||
/etc/calypso/
|
||||
calypso.yaml
|
||||
secrets.env
|
||||
tls/
|
||||
integrations/
|
||||
system/
|
||||
```
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Configuration file path: `/etc/calypso/config.yaml` (as per main.go)
|
||||
- ✅ `config.yaml.example` exists in repository
|
||||
- ⚠️ Other directories (secrets.env, tls/, integrations/, system/) not explicitly created
|
||||
|
||||
**Status:** ✅ **MOSTLY ALIGNED** - Main config path correct, subdirectories can be added
|
||||
|
||||
---
|
||||
|
||||
### 2.4 ZFS Data Layout ⚠️ **NOT IMPLEMENTED**
|
||||
|
||||
**Documentation Spec:**
|
||||
```
|
||||
/srv/calypso/
|
||||
db/
|
||||
backups/
|
||||
object/
|
||||
shares/
|
||||
vtl/
|
||||
iscsi/
|
||||
uploads/
|
||||
cache/
|
||||
_system/
|
||||
```
|
||||
|
||||
**Current Implementation:**
|
||||
- ❌ No explicit `/srv/calypso/` directory structure
|
||||
- ⚠️ ZFS datasets may be created but not organized per this structure
|
||||
- ⚠️ Data stored in various locations (database in PostgreSQL default, etc.)
|
||||
|
||||
**Gaps Identified:**
|
||||
1. No centralized data directory structure
|
||||
2. ZFS datasets not organized per spec
|
||||
3. Data scattered across system
|
||||
|
||||
**Recommendations:**
|
||||
- [ ] Create `/srv/calypso/` directory structure
|
||||
- [ ] Organize ZFS datasets per spec
|
||||
- [ ] Update services to use centralized data locations
|
||||
|
||||
**Status:** ❌ **NOT IMPLEMENTED** - Needs implementation
|
||||
|
||||
---
|
||||
|
||||
## 3. Component Architecture Review
|
||||
|
||||
### 3.1 Core Components ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Calypso Control Plane (Go-based API) ✅
|
||||
- ZFS (core storage) ✅
|
||||
- Bacula (backup) ✅
|
||||
- MinIO (object storage) ⚠️
|
||||
- SCST (iSCSI) ✅
|
||||
- MHVTL (virtual tape library) ✅
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Go-based API implemented
|
||||
- ✅ ZFS integration implemented
|
||||
- ✅ Bacula/Bareos integration implemented
|
||||
- ⚠️ Object storage: UI exists but backend integration not confirmed
|
||||
- ✅ SCST integration implemented
|
||||
- ✅ MHVTL integration implemented
|
||||
|
||||
**Status:** ✅ **MOSTLY ALIGNED** - Object storage backend needs verification
|
||||
|
||||
---
|
||||
|
||||
## 4. Technology Stack Review
|
||||
|
||||
### 4.1 Backend Stack ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Go-based API
|
||||
- PostgreSQL database
|
||||
- Systemd service management
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Go 1.21+ (go.mod confirms)
|
||||
- ✅ PostgreSQL (database package confirms)
|
||||
- ✅ Systemd services (deploy/systemd/ confirms)
|
||||
- ✅ Gin web framework
|
||||
- ✅ Structured logging (zerolog)
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
### 4.2 Frontend Stack ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- React-based UI
|
||||
- Modern build tooling
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ React 18 with TypeScript
|
||||
- ✅ Vite build tool
|
||||
- ✅ TailwindCSS styling
|
||||
- ✅ TanStack Query for data fetching
|
||||
- ✅ React Router for navigation
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
### 4.3 External Dependencies ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- ZFS tools
|
||||
- SCST
|
||||
- Bacula/Bareos
|
||||
- MHVTL
|
||||
- System utilities
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ ZFS integration (storage/zfs.go)
|
||||
- ✅ SCST integration (scst/ package)
|
||||
- ✅ Bacula/Bareos integration (backup/ package)
|
||||
- ✅ MHVTL integration (tape_vtl/ package)
|
||||
- ✅ System utilities (system/ package)
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
## 5. Security Architecture Review
|
||||
|
||||
### 5.1 Service Isolation ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Service isolation
|
||||
- Permission-based filesystem access
|
||||
- Secrets separation
|
||||
- Controlled subsystem access
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Systemd service isolation
|
||||
- ✅ RBAC permission system (IAM package)
|
||||
- ✅ JWT authentication
|
||||
- ✅ Permission middleware
|
||||
- ✅ Audit logging
|
||||
|
||||
**Status:** ✅ **FULLY ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
## 6. Upgrade & Rollback Review
|
||||
|
||||
### 6.1 Version Management ❌ **NOT IMPLEMENTED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- Versioned releases
|
||||
- Atomic switch via symlink
|
||||
- Data preserved independently in ZFS
|
||||
|
||||
**Current Implementation:**
|
||||
- ❌ No versioned release structure
|
||||
- ❌ No symlink mechanism
|
||||
- ⚠️ Data preservation depends on database backups
|
||||
|
||||
**Gaps Identified:**
|
||||
1. No release versioning system
|
||||
2. No atomic upgrade mechanism
|
||||
3. No rollback capability
|
||||
|
||||
**Recommendations:**
|
||||
- [ ] Implement release versioning
|
||||
- [ ] Create symlink-based upgrade mechanism
|
||||
- [ ] Document rollback procedures
|
||||
|
||||
**Status:** ❌ **NOT IMPLEMENTED** - Needs implementation
|
||||
|
||||
---
|
||||
|
||||
## 7. Data Flow Review
|
||||
|
||||
### 7.1 Request Flow ✅ **ALIGNED**
|
||||
|
||||
**Documentation Spec:**
|
||||
- User actions handled by Calypso API
|
||||
- Operations executed on ZFS datasets
|
||||
- Metadata stored centrally in ZFS
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ User actions via API
|
||||
- ✅ ZFS operations via storage service
|
||||
- ⚠️ Metadata stored in PostgreSQL (not ZFS)
|
||||
|
||||
**Note:** Current implementation uses PostgreSQL for metadata, which is acceptable but differs from spec. This is actually a better practice for metadata management.
|
||||
|
||||
**Status:** ✅ **FUNCTIONALLY ALIGNED** (with improvement)
|
||||
|
||||
---
|
||||
|
||||
## 8. Environment Configuration Review
|
||||
|
||||
### 8.1 Development Environment ✅ **ALIGNED**
|
||||
|
||||
**Current Implementation:**
|
||||
- ✅ Development setup in `/development/calypso/`
|
||||
- ✅ Separate dev and production configs
|
||||
- ✅ Development systemd service
|
||||
- ✅ Build scripts
|
||||
|
||||
**Status:** ✅ **ALIGNED**
|
||||
|
||||
---
|
||||
|
||||
### 8.2 Production Environment ⚠️ **NEEDS IMPROVEMENT**
|
||||
|
||||
**Gaps Identified:**
|
||||
1. No production deployment script
|
||||
2. No production directory structure setup
|
||||
3. No production configuration templates
|
||||
|
||||
**Recommendations:**
|
||||
- [ ] Create production deployment script
|
||||
- [ ] Set up production directory structure
|
||||
- [ ] Create production configuration templates
|
||||
|
||||
**Status:** ⚠️ **NEEDS IMPROVEMENT**
|
||||
|
||||
---
|
||||
|
||||
## 9. Summary of Findings
|
||||
|
||||
### 9.1 Fully Aligned ✅
|
||||
- High-level architecture
|
||||
- Deployment model
|
||||
- Component architecture
|
||||
- Technology stack
|
||||
- Security architecture
|
||||
- Request/data flow
|
||||
- Development environment
|
||||
|
||||
### 9.2 Partially Aligned ⚠️
|
||||
- Filesystem domain separation (structure exists but not fully organized)
|
||||
- Configuration layout (main path correct, subdirectories can be added)
|
||||
|
||||
### 9.3 Not Aligned ❌
|
||||
- Binary layout (no versioned releases)
|
||||
- ZFS data layout (not organized per spec)
|
||||
- Upgrade & rollback (not implemented)
|
||||
|
||||
---
|
||||
|
||||
## 10. Recommendations
|
||||
|
||||
### 10.1 High Priority
|
||||
1. **Implement Binary Layout Structure**
|
||||
- Create `/opt/adastra/calypso/releases/` structure
|
||||
- Implement versioned releases
|
||||
- Create symlink mechanism
|
||||
|
||||
2. **Organize Data Directory Structure**
|
||||
- Create `/srv/calypso/` with subdirectories
|
||||
- Organize ZFS datasets per spec
|
||||
- Update services to use centralized locations
|
||||
|
||||
3. **Implement Upgrade & Rollback**
|
||||
- Version management system
|
||||
- Atomic upgrade mechanism
|
||||
- Rollback procedures
|
||||
|
||||
### 10.2 Medium Priority
|
||||
1. **Complete Configuration Layout**
|
||||
- Create subdirectories (tls/, integrations/, system/)
|
||||
- Organize secrets.env
|
||||
|
||||
2. **Production Deployment**
|
||||
- Production deployment script
|
||||
- Production directory setup
|
||||
- Production configuration templates
|
||||
|
||||
### 10.3 Low Priority
|
||||
1. **Log Directory Organization**
|
||||
- Configure logging to `/var/log/calypso/`
|
||||
- Log rotation configuration
|
||||
|
||||
2. **Runtime Directory Organization**
|
||||
- Configure runtime directories
|
||||
- PID file management
|
||||
|
||||
---
|
||||
|
||||
## 11. Action Items
|
||||
|
||||
### Immediate Actions
|
||||
- [ ] Review and approve this assessment
|
||||
- [ ] Prioritize gaps based on business needs
|
||||
- [ ] Create implementation plan for high-priority items
|
||||
|
||||
### Short-term (1-2 weeks)
|
||||
- [ ] Implement binary layout structure
|
||||
- [ ] Organize data directory structure
|
||||
- [ ] Create production deployment script
|
||||
|
||||
### Medium-term (1 month)
|
||||
- [ ] Implement upgrade & rollback mechanism
|
||||
- [ ] Complete configuration layout
|
||||
- [ ] Organize log and runtime directories
|
||||
|
||||
---
|
||||
|
||||
## 12. Conclusion
|
||||
|
||||
The current infrastructure and environment implementation is **functionally aligned** with the architecture specification in terms of core functionality and component integration. However, there are **structural gaps** in filesystem organization, binary deployment, and upgrade/rollback mechanisms.
|
||||
|
||||
**Key Strengths:**
|
||||
- ✅ Solid component architecture
|
||||
- ✅ Good security implementation
|
||||
- ✅ Proper technology stack
|
||||
- ✅ Functional data flow
|
||||
|
||||
**Key Gaps:**
|
||||
- ❌ Filesystem organization per spec
|
||||
- ❌ Versioned release structure
|
||||
- ❌ Upgrade/rollback mechanism
|
||||
|
||||
**Overall Assessment:** The system is **production-ready for functionality** but needs **structural improvements** for enterprise-grade deployment and maintenance.
|
||||
|
||||
---
|
||||
|
||||
## Document History
|
||||
|
||||
| Version | Date | Author | Changes |
|
||||
|---------|------|--------|---------|
|
||||
| 1.0 | 2025-01-XX | Development Team | Initial infrastructure review |
|
||||
|
||||
@@ -34,6 +34,13 @@ Located in `sds/` directory:
|
||||
### Coding Standards
|
||||
- **CODING-STANDARDS.md**: Code style, naming conventions, and best practices for Go and TypeScript/React
|
||||
|
||||
### Infrastructure Review
|
||||
- **INFRASTRUCTURE-REVIEW.md**: Review of current infrastructure and environment against architecture specification
|
||||
- **Calypso_System_Architecture.md**: System architecture specification document
|
||||
|
||||
### Technology Stack
|
||||
- **TECHNOLOGY-STACK.md**: Comprehensive list of all technologies, frameworks, libraries, and tools used in Calypso
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### Features Implemented
|
||||
|
||||
152
docs/alpha/TECHNOLOGY-STACK-SUMMARY.md
Normal file
152
docs/alpha/TECHNOLOGY-STACK-SUMMARY.md
Normal file
@@ -0,0 +1,152 @@
|
||||
# Technology Stack Summary
|
||||
## AtlasOS - Calypso Backup Appliance
|
||||
|
||||
Quick reference for all technologies used in Calypso.
|
||||
|
||||
---
|
||||
|
||||
## 🖥️ Operating System
|
||||
- **Ubuntu Server 24.04 LTS**
|
||||
- **Linux Kernel 6.8+**
|
||||
- **systemd** - Service management
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Backend Stack
|
||||
|
||||
### Core
|
||||
- **Go 1.24+** - Programming language
|
||||
- **Gin** - Web framework
|
||||
- **PostgreSQL 14+** - Database
|
||||
|
||||
### Libraries
|
||||
- **JWT (golang-jwt/jwt/v5)** - Authentication
|
||||
- **UUID (google/uuid)** - UUID generation
|
||||
- **WebSocket (gorilla/websocket)** - Real-time communication
|
||||
- **Zap (uber.org/zap)** - Structured logging
|
||||
- **YAML (gopkg.in/yaml.v3)** - Configuration parsing
|
||||
- **lib/pq** - PostgreSQL driver (for arrays)
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Frontend Stack
|
||||
|
||||
### Core
|
||||
- **React 19** - UI framework
|
||||
- **TypeScript** - Type-safe JavaScript
|
||||
- **Vite** - Build tool
|
||||
|
||||
### Libraries
|
||||
- **React Router DOM** - Routing
|
||||
- **TanStack Query** - Data fetching & caching
|
||||
- **Zustand** - State management
|
||||
- **Axios** - HTTP client
|
||||
- **TailwindCSS** - Styling
|
||||
- **Lucide React** - Icons
|
||||
- **Recharts** - Charts
|
||||
- **xterm.js** - Terminal emulator
|
||||
|
||||
---
|
||||
|
||||
## 💾 Storage Technologies
|
||||
|
||||
### File Systems
|
||||
- **ZFS** - Primary storage filesystem
|
||||
- **LVM2** - Logical volume management
|
||||
- **XFS** - High-performance filesystem
|
||||
- **ext4** - Alternative filesystem
|
||||
|
||||
### Tools
|
||||
- **parted, gdisk** - Partition management
|
||||
- **smartmontools** - Disk monitoring
|
||||
- **nvme-cli** - NVMe management
|
||||
|
||||
---
|
||||
|
||||
## 🌐 Network & File Sharing
|
||||
|
||||
### Protocols
|
||||
- **NFS** - Network File System (nfs-kernel-server)
|
||||
- **Samba** - SMB/CIFS file sharing
|
||||
- **iSCSI** - Block storage (SCST)
|
||||
|
||||
### Tools
|
||||
- **SCST** - iSCSI target subsystem
|
||||
- **open-iscsi** - iSCSI initiator
|
||||
|
||||
---
|
||||
|
||||
## 💿 Backup & Tape
|
||||
|
||||
### Software
|
||||
- **Bacula/Bareos** - Backup software
|
||||
- **MHVTL** - Virtual Tape Library
|
||||
|
||||
### Tools
|
||||
- **lsscsi** - SCSI device listing
|
||||
- **sg3-utils** - SCSI generic utilities
|
||||
- **mt-st** - Tape utilities
|
||||
- **mtx** - Media changer control
|
||||
|
||||
---
|
||||
|
||||
## 🛡️ Security
|
||||
|
||||
### Antivirus
|
||||
- **ClamAV** - Antivirus engine
|
||||
- clamav-daemon
|
||||
- clamav-freshclam
|
||||
|
||||
### Authentication
|
||||
- **JWT** - Token-based auth
|
||||
- **bcrypt/Argon2** - Password hashing
|
||||
- **RBAC** - Role-based access control
|
||||
|
||||
---
|
||||
|
||||
## 📊 Monitoring
|
||||
|
||||
### Built-in
|
||||
- **Custom Metrics Service** - System metrics
|
||||
- **Health Checks** - Service health
|
||||
- **Audit Logging** - Database-backed audit
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Reverse Proxy (Optional)
|
||||
|
||||
- **Nginx** - Web server
|
||||
- **Caddy** - Web server with auto-HTTPS
|
||||
|
||||
---
|
||||
|
||||
## 📦 Package Count
|
||||
|
||||
- **Backend Go Dependencies:** ~50 packages
|
||||
- **Frontend npm Dependencies:** ~300+ packages
|
||||
- **System Packages:** ~50+ packages
|
||||
|
||||
---
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────┐
|
||||
│ React 19 + TypeScript + Vite │ Frontend
|
||||
└──────────────┬──────────────────┘
|
||||
│ HTTP/REST
|
||||
┌──────────────▼──────────────────┐
|
||||
│ Go 1.24 + Gin + PostgreSQL │ Backend
|
||||
└──────────────┬──────────────────┘
|
||||
│
|
||||
┌──────────────▼──────────────────┐
|
||||
│ ZFS + SCST + Bacula + ClamAV │ System Services
|
||||
└──────────────────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📚 Full Documentation
|
||||
|
||||
See `TECHNOLOGY-STACK.md` for complete details.
|
||||
|
||||
501
docs/alpha/TECHNOLOGY-STACK.md
Normal file
501
docs/alpha/TECHNOLOGY-STACK.md
Normal file
@@ -0,0 +1,501 @@
|
||||
# Technology Stack
|
||||
## AtlasOS - Calypso Backup Appliance
|
||||
|
||||
**Version:** 1.0.0-alpha
|
||||
**Last Updated:** 2025-01-XX
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This document provides a comprehensive list of all technologies, frameworks, libraries, and tools used in the Calypso backup appliance.
|
||||
|
||||
---
|
||||
|
||||
## 1. Operating System & Base Platform
|
||||
|
||||
### 1.1 Operating System
|
||||
- **Ubuntu Server 24.04 LTS** (Primary target)
|
||||
- **Linux Kernel** 6.8+ (with ZFS, SCST support)
|
||||
- **systemd** - Service management
|
||||
- **journald** - System logging
|
||||
|
||||
### 1.2 Base System Tools
|
||||
- **chrony** - NTP time synchronization
|
||||
- **ufw** - Firewall management
|
||||
- **nftables** - Network filtering (alternative)
|
||||
- **udev** - Device management
|
||||
- **lsb-release** - Linux Standard Base
|
||||
|
||||
---
|
||||
|
||||
## 2. Backend Technology Stack
|
||||
|
||||
### 2.1 Programming Language
|
||||
- **Go 1.22+** (golang)
|
||||
- Version: 1.22.0 or later
|
||||
- Architecture: linux-amd64
|
||||
|
||||
### 2.2 Web Framework
|
||||
- **Gin** - HTTP web framework
|
||||
- `github.com/gin-gonic/gin`
|
||||
- RESTful API implementation
|
||||
- Middleware support
|
||||
|
||||
### 2.3 Database
|
||||
- **PostgreSQL 14+**
|
||||
- Primary database for metadata
|
||||
- Connection pooling (pgxpool)
|
||||
- Migration system
|
||||
|
||||
### 2.4 Database Drivers
|
||||
- **pgx/v5** - PostgreSQL driver
|
||||
- `github.com/jackc/pgx/v5`
|
||||
- `github.com/jackc/pgx/v5/pgxpool`
|
||||
- **lib/pq** - PostgreSQL driver (for array types)
|
||||
- `github.com/lib/pq`
|
||||
|
||||
### 2.5 Authentication & Security
|
||||
- **JWT** - JSON Web Tokens
|
||||
- `github.com/golang-jwt/jwt/v5`
|
||||
- **bcrypt** - Password hashing
|
||||
- `golang.org/x/crypto/bcrypt`
|
||||
- **Argon2** - Password hashing (alternative)
|
||||
|
||||
### 2.6 Configuration Management
|
||||
- **Viper** - Configuration management
|
||||
- `github.com/spf13/viper`
|
||||
- **YAML** - Configuration format
|
||||
|
||||
### 2.7 Logging
|
||||
- **Zerolog** - Structured logging
|
||||
- `github.com/rs/zerolog`
|
||||
- **JSON** - Log format
|
||||
|
||||
### 2.8 HTTP Client & Utilities
|
||||
- **HTTP Client** - Standard library
|
||||
- **Context** - Request context management
|
||||
- **Time** - Time handling
|
||||
|
||||
### 2.9 Additional Go Libraries
|
||||
- **UUID** - UUID generation
|
||||
- `github.com/google/uuid`
|
||||
- **Errors** - Error handling
|
||||
- `github.com/pkg/errors`
|
||||
- **Sync** - Concurrency primitives
|
||||
- `golang.org/x/sync/errgroup`
|
||||
|
||||
---
|
||||
|
||||
## 3. Frontend Technology Stack
|
||||
|
||||
### 3.1 Core Framework
|
||||
- **React 18** - UI library
|
||||
- Version: 18.x
|
||||
- TypeScript support
|
||||
|
||||
### 3.2 Build Tool
|
||||
- **Vite** - Build tool and dev server
|
||||
- Fast HMR (Hot Module Replacement)
|
||||
- Optimized production builds
|
||||
|
||||
### 3.3 Programming Language
|
||||
- **TypeScript** - Type-safe JavaScript
|
||||
- Type checking
|
||||
- Modern ES6+ features
|
||||
|
||||
### 3.4 Routing
|
||||
- **React Router DOM** - Client-side routing
|
||||
- `react-router-dom`
|
||||
- Version: 6.x
|
||||
|
||||
### 3.5 State Management
|
||||
- **Zustand** - Lightweight state management
|
||||
- `zustand`
|
||||
- Global state (auth, UI state)
|
||||
|
||||
### 3.6 Data Fetching
|
||||
- **TanStack Query (React Query)** - Server state management
|
||||
- `@tanstack/react-query`
|
||||
- Caching, refetching, mutations
|
||||
|
||||
### 3.7 HTTP Client
|
||||
- **Axios** - HTTP client
|
||||
- `axios`
|
||||
- Request/response interceptors
|
||||
|
||||
### 3.8 Styling
|
||||
- **TailwindCSS** - Utility-first CSS framework
|
||||
- `tailwindcss`
|
||||
- PostCSS integration
|
||||
- Dark theme support
|
||||
|
||||
### 3.9 Icons
|
||||
- **Lucide React** - Icon library
|
||||
- `lucide-react`
|
||||
- Modern icon set
|
||||
|
||||
### 3.10 UI Components
|
||||
- **shadcn/ui** - UI component library (planned)
|
||||
- **Custom Components** - Built with TailwindCSS
|
||||
|
||||
### 3.11 Charts & Visualization
|
||||
- **Recharts** - Chart library
|
||||
- `recharts`
|
||||
- Line, bar, pie charts
|
||||
|
||||
### 3.12 Notifications
|
||||
- **Sonner** - Toast notifications
|
||||
- `sonner`
|
||||
- Success, error, warning toasts
|
||||
|
||||
---
|
||||
|
||||
## 4. Storage Technologies
|
||||
|
||||
### 4.1 File System
|
||||
- **ZFS** - Zettabyte File System
|
||||
- `zfsutils-linux`
|
||||
- `zfs-dkms`
|
||||
- Pool and dataset management
|
||||
- Snapshots and replication
|
||||
|
||||
### 4.2 Block Storage
|
||||
- **LVM2** - Logical Volume Manager
|
||||
- Volume group management
|
||||
- Thin provisioning
|
||||
|
||||
### 4.3 File Systems
|
||||
- **XFS** - High-performance filesystem (primary)
|
||||
- **ext4** - Alternative filesystem
|
||||
|
||||
### 4.4 Disk Management
|
||||
- **parted** - Partition management
|
||||
- **gdisk** - GPT partition editor
|
||||
- **smartmontools** - SMART disk monitoring
|
||||
- **nvme-cli** - NVMe device management
|
||||
|
||||
---
|
||||
|
||||
## 5. Network & File Sharing
|
||||
|
||||
### 5.1 File Sharing Protocols
|
||||
- **NFS** - Network File System
|
||||
- `nfs-kernel-server`
|
||||
- `nfs-common`
|
||||
- NFSv4 support
|
||||
|
||||
- **Samba** - SMB/CIFS protocol
|
||||
- `samba`
|
||||
- `samba-common-bin`
|
||||
- Windows file sharing compatibility
|
||||
|
||||
### 5.2 iSCSI
|
||||
- **SCST** - SCSI Target Subsystem
|
||||
- Kernel module
|
||||
- `iscsi-scst`
|
||||
- `scstadmin` - Management tool
|
||||
|
||||
### 5.3 Network Tools
|
||||
- **open-iscsi** - iSCSI initiator
|
||||
- **iscsiadm** - iSCSI administration
|
||||
|
||||
---
|
||||
|
||||
## 6. Backup & Tape Technologies
|
||||
|
||||
### 6.1 Backup Software
|
||||
- **Bacula** - Backup software
|
||||
- `bacula-common`
|
||||
- `bacula-sd` - Storage daemon
|
||||
- `bacula-client`
|
||||
- `bacula-console` - Management console
|
||||
|
||||
- **Bareos** - Bacula fork (alternative)
|
||||
|
||||
### 6.2 Virtual Tape Library
|
||||
- **MHVTL** - Virtual Tape Library
|
||||
- `mhvtl`
|
||||
- `mhvtl-utils`
|
||||
- `vtlcmd` - Management tool
|
||||
|
||||
### 6.3 Physical Tape
|
||||
- **lsscsi** - List SCSI devices
|
||||
- **sg3-utils** - SCSI generic utilities
|
||||
- **mt-st** - Magnetic tape utilities
|
||||
- **mtx** - Media changer control
|
||||
|
||||
---
|
||||
|
||||
## 7. Security & Antivirus
|
||||
|
||||
### 7.1 Antivirus
|
||||
- **ClamAV** - Antivirus engine
|
||||
- `clamav`
|
||||
- `clamav-daemon`
|
||||
- `clamav-freshclam` - Virus definition updates
|
||||
- `clamav-unofficial-sigs` - Unofficial signatures
|
||||
|
||||
---
|
||||
|
||||
## 8. Object Storage
|
||||
|
||||
### 8.1 S3-Compatible Storage
|
||||
- **MinIO** - Object storage (planned/integration)
|
||||
- S3-compatible API
|
||||
- Bucket management
|
||||
|
||||
---
|
||||
|
||||
## 9. Development Tools
|
||||
|
||||
### 9.1 Build Tools
|
||||
- **Make** - Build automation
|
||||
- **Go Build** - Go compiler
|
||||
- **npm/pnpm** - Node.js package manager
|
||||
|
||||
### 9.2 Version Control
|
||||
- **Git** - Version control system
|
||||
|
||||
### 9.3 Code Quality
|
||||
- **gofmt** - Go code formatter
|
||||
- **goimports** - Go import organizer
|
||||
- **golint** - Go linter (optional)
|
||||
- **go vet** - Go static analysis
|
||||
|
||||
### 9.4 Frontend Tools
|
||||
- **Prettier** - Code formatter
|
||||
- **ESLint** - JavaScript/TypeScript linter
|
||||
- **TypeScript Compiler** - Type checking
|
||||
|
||||
---
|
||||
|
||||
## 10. System Services
|
||||
|
||||
### 10.1 Service Management
|
||||
- **systemd** - Service manager
|
||||
- **journalctl** - Log viewing
|
||||
|
||||
### 10.2 Reverse Proxy (Optional)
|
||||
- **Nginx** - Web server and reverse proxy
|
||||
- **Caddy** - Web server with automatic HTTPS
|
||||
|
||||
---
|
||||
|
||||
## 11. Monitoring & Observability
|
||||
|
||||
### 11.1 Metrics Collection
|
||||
- **Custom Metrics Service** - Built-in metrics
|
||||
- **System Metrics** - CPU, memory, disk, network
|
||||
|
||||
### 11.2 Logging
|
||||
- **Structured Logging** - JSON format
|
||||
- **Audit Logging** - Database-backed audit trail
|
||||
|
||||
### 11.3 Health Checks
|
||||
- **Health Endpoint** - `/api/v1/health`
|
||||
- **Service Status** - Component health monitoring
|
||||
|
||||
---
|
||||
|
||||
## 12. Database Technologies
|
||||
|
||||
### 12.1 Primary Database
|
||||
- **PostgreSQL 14+**
|
||||
- Metadata storage
|
||||
- User management
|
||||
- Audit logs
|
||||
- Task tracking
|
||||
- Alert management
|
||||
|
||||
### 12.2 Database Tools
|
||||
- **psql** - PostgreSQL client
|
||||
- **pg_dump** - Database backup
|
||||
- **pg_restore** - Database restore
|
||||
|
||||
---
|
||||
|
||||
## 13. Web Technologies
|
||||
|
||||
### 13.1 Protocols
|
||||
- **HTTP/1.1** - Web protocol
|
||||
- **HTTPS** - Secure HTTP (with TLS)
|
||||
- **WebSocket** - Real-time communication (planned)
|
||||
|
||||
### 13.2 API
|
||||
- **RESTful API** - Resource-based API
|
||||
- **JSON** - Data interchange format
|
||||
|
||||
---
|
||||
|
||||
## 14. Container & Virtualization (Future)
|
||||
|
||||
### 14.1 Container Technologies (Not in V1)
|
||||
- **Docker** - Containerization (future)
|
||||
- **Kubernetes** - Orchestration (future)
|
||||
|
||||
---
|
||||
|
||||
## 15. Package Management
|
||||
|
||||
### 15.1 Backend
|
||||
- **Go Modules** - Dependency management
|
||||
- `go.mod`
|
||||
- `go.sum`
|
||||
|
||||
### 15.2 Frontend
|
||||
- **npm** - Node.js package manager
|
||||
- **pnpm** - Fast, disk space efficient package manager
|
||||
|
||||
---
|
||||
|
||||
## 16. Testing Tools (Development)
|
||||
|
||||
### 16.1 Backend Testing
|
||||
- **Go Testing** - Built-in testing framework
|
||||
- **Testify** - Testing toolkit (if used)
|
||||
|
||||
### 16.2 Frontend Testing
|
||||
- **Vitest** - Unit testing (with Vite)
|
||||
- **React Testing Library** - Component testing
|
||||
|
||||
---
|
||||
|
||||
## 17. Documentation Tools
|
||||
|
||||
### 17.1 Documentation
|
||||
- **Markdown** - Documentation format
|
||||
- **Mermaid** - Diagram generation (in docs)
|
||||
|
||||
---
|
||||
|
||||
## 18. Security Tools
|
||||
|
||||
### 18.1 Encryption
|
||||
- **TLS/SSL** - Transport layer security
|
||||
- **bcrypt** - Password hashing
|
||||
- **Argon2** - Password hashing (alternative)
|
||||
|
||||
### 18.2 Access Control
|
||||
- **JWT** - Token-based authentication
|
||||
- **RBAC** - Role-Based Access Control
|
||||
- **Permission System** - Resource-based permissions
|
||||
|
||||
---
|
||||
|
||||
## 19. Version Information
|
||||
|
||||
### 19.1 Backend Dependencies
|
||||
See `backend/go.mod` for complete list of Go dependencies.
|
||||
|
||||
### 19.2 Frontend Dependencies
|
||||
See `frontend/package.json` for complete list of npm dependencies.
|
||||
|
||||
---
|
||||
|
||||
## 20. External Integrations
|
||||
|
||||
### 20.1 System Integrations
|
||||
- **ZFS Commands** - `zpool`, `zfs`
|
||||
- **SCST Commands** - `scstadmin`
|
||||
- **Bacula Commands** - `bconsole`
|
||||
- **MHVTL Commands** - `vtlcmd`
|
||||
- **Systemd Commands** - `systemctl`
|
||||
|
||||
### 20.2 File System Integrations
|
||||
- **NFS Exports** - `/etc/exports`
|
||||
- **Samba Config** - `/etc/samba/smb.conf`
|
||||
- **ClamAV Config** - `/etc/clamav/`
|
||||
|
||||
---
|
||||
|
||||
## 21. Build & Deployment
|
||||
|
||||
### 21.1 Build Process
|
||||
- **Go Build** - Compile Go binary
|
||||
- **Vite Build** - Build frontend assets
|
||||
- **Makefile** - Build automation
|
||||
|
||||
### 21.2 Deployment
|
||||
- **Systemd Services** - Service deployment
|
||||
- **Installer Scripts** - Automated installation
|
||||
- **Configuration Management** - YAML-based config
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
### Core Stack
|
||||
- **Backend:** Go 1.22+ + Gin + PostgreSQL
|
||||
- **Frontend:** React 18 + TypeScript + Vite + TailwindCSS
|
||||
- **Storage:** ZFS + LVM2 + XFS
|
||||
- **File Sharing:** NFS + Samba
|
||||
- **iSCSI:** SCST
|
||||
- **Backup:** Bacula/Bareos
|
||||
- **Tape:** MHVTL + Physical tape tools
|
||||
- **Antivirus:** ClamAV
|
||||
- **Security:** JWT + bcrypt + RBAC
|
||||
|
||||
### Technology Categories
|
||||
- **Languages:** Go, TypeScript, JavaScript, SQL, Bash
|
||||
- **Frameworks:** Gin, React, TailwindCSS
|
||||
- **Databases:** PostgreSQL
|
||||
- **Storage:** ZFS, LVM2, XFS
|
||||
- **Networking:** NFS, SMB/CIFS, iSCSI
|
||||
- **Security:** JWT, bcrypt, ClamAV
|
||||
- **Tools:** Git, Make, systemd, journald
|
||||
|
||||
---
|
||||
|
||||
## Version Matrix
|
||||
|
||||
| Component | Version | Purpose |
|
||||
|-----------|---------|---------|
|
||||
| Go | 1.22+ | Backend language |
|
||||
| Node.js | 20.x LTS | Frontend runtime |
|
||||
| React | 18.x | Frontend framework |
|
||||
| PostgreSQL | 14+ | Database |
|
||||
| ZFS | Latest | Storage filesystem |
|
||||
| SCST | Latest | iSCSI target |
|
||||
| Bacula | Latest | Backup software |
|
||||
| ClamAV | Latest | Antivirus |
|
||||
| NFS | Latest | Network file sharing |
|
||||
| Samba | Latest | SMB/CIFS file sharing |
|
||||
|
||||
---
|
||||
|
||||
## Dependencies Count
|
||||
|
||||
- **Backend Go Dependencies:** ~30+ packages
|
||||
- **Frontend npm Dependencies:** ~300+ packages
|
||||
- **System Packages:** ~50+ packages
|
||||
|
||||
---
|
||||
|
||||
## License Information
|
||||
|
||||
Most components use open-source licenses:
|
||||
- **Go:** BSD-style license
|
||||
- **React:** MIT License
|
||||
- **PostgreSQL:** PostgreSQL License
|
||||
- **ZFS:** CDDL License
|
||||
- **ClamAV:** GPL License
|
||||
- **Samba:** GPL License
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- Backend dependencies: `backend/go.mod`
|
||||
- Frontend dependencies: `frontend/package.json`
|
||||
- System requirements: `scripts/install-requirements.sh`
|
||||
- Architecture: `docs/alpha/Calypso_System_Architecture.md`
|
||||
|
||||
---
|
||||
|
||||
**Document History**
|
||||
|
||||
| Version | Date | Author | Changes |
|
||||
|---------|------|--------|---------|
|
||||
| 1.0 | 2025-01-XX | Development Team | Initial technology stack documentation |
|
||||
|
||||
443
docs/alpha/components/bacula/BACULA-CONFIGURATION.md
Normal file
443
docs/alpha/components/bacula/BACULA-CONFIGURATION.md
Normal file
@@ -0,0 +1,443 @@
|
||||
# Bacula Configuration Guide
|
||||
## For Calypso Backup Appliance
|
||||
|
||||
**Version:** 1.0
|
||||
**Target OS:** Ubuntu Server 24.04 LTS
|
||||
|
||||
---
|
||||
|
||||
## 1. Overview
|
||||
|
||||
This guide covers advanced configuration of Bacula for integration with Calypso backup appliance, including storage pools, schedules, clients, and job definitions.
|
||||
|
||||
---
|
||||
|
||||
## 2. Configuration Files
|
||||
|
||||
### 2.1 Main Configuration Files
|
||||
|
||||
- **Director:** `/opt/bacula/etc/bacula-dir.conf`
|
||||
- **Storage Daemon:** `/opt/bacula/etc/bacula-sd.conf`
|
||||
- **File Daemon:** `/opt/bacula/etc/bacula-fd.conf`
|
||||
- **Console:** `/opt/bacula/etc/bconsole.conf`
|
||||
|
||||
### 2.2 Configuration File Structure
|
||||
|
||||
Each configuration file contains:
|
||||
- **Resource definitions** (Director, Storage, Client, etc.)
|
||||
- **Directives** (settings and options)
|
||||
- **Comments** (documentation)
|
||||
|
||||
---
|
||||
|
||||
## 3. Director Configuration
|
||||
|
||||
### 3.1 Director Resource
|
||||
|
||||
```conf
|
||||
Director {
|
||||
Name = bacula-dir
|
||||
DIRport = 9101
|
||||
QueryFile = "/opt/bacula/scripts/query.sql"
|
||||
WorkingDirectory = "/opt/bacula/working"
|
||||
PidDirectory = "/opt/bacula/working"
|
||||
Maximum Concurrent Jobs = 10
|
||||
Password = "director-password"
|
||||
Messages = Daemon
|
||||
}
|
||||
```
|
||||
|
||||
### 3.2 Catalog Resource
|
||||
|
||||
```conf
|
||||
Catalog {
|
||||
Name = MyCatalog
|
||||
dbname = "bacula"
|
||||
dbuser = "bacula"
|
||||
dbpassword = "bacula-db-password"
|
||||
dbaddress = "localhost"
|
||||
dbport = 5432
|
||||
}
|
||||
```
|
||||
|
||||
### 3.3 Storage Resource
|
||||
|
||||
```conf
|
||||
Storage {
|
||||
Name = FileStorage
|
||||
Address = localhost
|
||||
SDPort = 9103
|
||||
Password = "storage-password"
|
||||
Device = FileStorage
|
||||
Media Type = File
|
||||
}
|
||||
```
|
||||
|
||||
### 3.4 Pool Resource
|
||||
|
||||
```conf
|
||||
Pool {
|
||||
Name = DefaultPool
|
||||
Pool Type = Backup
|
||||
Recycle = yes
|
||||
AutoPrune = yes
|
||||
Volume Retention = 365 days
|
||||
Maximum Volume Bytes = 50G
|
||||
Maximum Volumes = 100
|
||||
Label Format = "Volume-"
|
||||
}
|
||||
```
|
||||
|
||||
### 3.5 Schedule Resource
|
||||
|
||||
```conf
|
||||
Schedule {
|
||||
Name = WeeklyCycle
|
||||
Run = Full 1st sun at 2:05
|
||||
Run = Differential 2nd-5th sun at 2:05
|
||||
Run = Incremental mon-sat at 2:05
|
||||
}
|
||||
```
|
||||
|
||||
### 3.6 Client Resource
|
||||
|
||||
```conf
|
||||
Client {
|
||||
Name = client-fd
|
||||
Address = client.example.com
|
||||
FDPort = 9102
|
||||
Catalog = MyCatalog
|
||||
Password = "client-password"
|
||||
File Retention = 60 days
|
||||
Job Retention = 6 months
|
||||
AutoPrune = yes
|
||||
}
|
||||
```
|
||||
|
||||
### 3.7 Job Resource
|
||||
|
||||
```conf
|
||||
Job {
|
||||
Name = "BackupClient"
|
||||
Type = Backup
|
||||
Client = client-fd
|
||||
FileSet = "Full Set"
|
||||
Schedule = WeeklyCycle
|
||||
Storage = FileStorage
|
||||
Pool = DefaultPool
|
||||
Messages = Standard
|
||||
Priority = 10
|
||||
Write Bootstrap = "/opt/bacula/working/BackupClient.bsr"
|
||||
}
|
||||
```
|
||||
|
||||
### 3.8 FileSet Resource
|
||||
|
||||
```conf
|
||||
FileSet {
|
||||
Name = "Full Set"
|
||||
Include {
|
||||
Options {
|
||||
signature = MD5
|
||||
compression = GZIP
|
||||
}
|
||||
File = /home
|
||||
File = /etc
|
||||
File = /var
|
||||
}
|
||||
Exclude {
|
||||
File = /tmp
|
||||
File = /proc
|
||||
File = /sys
|
||||
File = /.snapshot
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Storage Daemon Configuration
|
||||
|
||||
### 4.1 Storage Resource
|
||||
|
||||
```conf
|
||||
Storage {
|
||||
Name = FileStorage
|
||||
WorkingDirectory = "/opt/bacula/working"
|
||||
Pid Directory = "/opt/bacula/working"
|
||||
Maximum Concurrent Jobs = 20
|
||||
}
|
||||
```
|
||||
|
||||
### 4.2 Director Resource (in SD)
|
||||
|
||||
```conf
|
||||
Director {
|
||||
Name = bacula-dir
|
||||
Password = "storage-password"
|
||||
}
|
||||
```
|
||||
|
||||
### 4.3 Device Resource (Disk)
|
||||
|
||||
```conf
|
||||
Device {
|
||||
Name = FileStorage
|
||||
Media Type = File
|
||||
Archive Device = /srv/calypso/backups
|
||||
LabelMedia = yes
|
||||
Random Access = yes
|
||||
AutomaticMount = yes
|
||||
RemovableMedia = no
|
||||
AlwaysOpen = no
|
||||
Maximum Concurrent Jobs = 5
|
||||
}
|
||||
```
|
||||
|
||||
### 4.4 Device Resource (Tape)
|
||||
|
||||
```conf
|
||||
Device {
|
||||
Name = TapeDrive-0
|
||||
Media Type = LTO-8
|
||||
Archive Device = /dev/nst0
|
||||
AutomaticMount = yes
|
||||
AlwaysOpen = no
|
||||
RemovableMedia = yes
|
||||
RandomAccess = no
|
||||
MaximumFileSize = 10GB
|
||||
MaximumBlockSize = 524288
|
||||
AutoChanger = yes
|
||||
ChangerDevice = /dev/sg0
|
||||
ChangerCommand = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. File Daemon Configuration
|
||||
|
||||
### 5.1 Director Resource (in FD)
|
||||
|
||||
```conf
|
||||
Director {
|
||||
Name = bacula-dir
|
||||
Password = "client-password"
|
||||
}
|
||||
```
|
||||
|
||||
### 5.2 FileDaemon Resource
|
||||
|
||||
```conf
|
||||
FileDaemon {
|
||||
Name = client-fd
|
||||
FDport = 9102
|
||||
WorkingDirectory = /opt/bacula/working
|
||||
Pid Directory = /opt/bacula/working
|
||||
Maximum Concurrent Jobs = 2
|
||||
Plugin Directory = /opt/bacula/plugins
|
||||
}
|
||||
```
|
||||
|
||||
### 5.3 Messages Resource
|
||||
|
||||
```conf
|
||||
Messages {
|
||||
Name = Standard
|
||||
director = bacula-dir = all, !skipped, !restored
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. Integration with Calypso Storage
|
||||
|
||||
### 6.1 Using Calypso ZFS Datasets
|
||||
|
||||
Configure Bacula to use ZFS datasets managed by Calypso:
|
||||
|
||||
```conf
|
||||
Device {
|
||||
Name = ZFSStorage
|
||||
Media Type = File
|
||||
Archive Device = /srv/calypso/backups/zfs-pool
|
||||
LabelMedia = yes
|
||||
Random Access = yes
|
||||
AutomaticMount = yes
|
||||
}
|
||||
```
|
||||
|
||||
### 6.2 Using Calypso Storage Repositories
|
||||
|
||||
```conf
|
||||
Device {
|
||||
Name = CalypsoRepo
|
||||
Media Type = File
|
||||
Archive Device = /srv/calypso/backups/repository-1
|
||||
LabelMedia = yes
|
||||
Random Access = yes
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. Advanced Configuration
|
||||
|
||||
### 7.1 Compression
|
||||
|
||||
Enable compression in FileSet:
|
||||
|
||||
```conf
|
||||
FileSet {
|
||||
Name = "Compressed Set"
|
||||
Include {
|
||||
Options {
|
||||
compression = GZIP9
|
||||
signature = MD5
|
||||
}
|
||||
File = /data
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 7.2 Deduplication
|
||||
|
||||
For ZFS with deduplication, use aligned plugin:
|
||||
|
||||
```conf
|
||||
FileSet {
|
||||
Name = "Deduplicated Set"
|
||||
Include {
|
||||
Options {
|
||||
plugin = "aligned"
|
||||
}
|
||||
File = /data
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 7.3 Encryption
|
||||
|
||||
Enable encryption (requires encryption plugin):
|
||||
|
||||
```conf
|
||||
FileSet {
|
||||
Name = "Encrypted Set"
|
||||
Include {
|
||||
Options {
|
||||
encryption = AES256
|
||||
}
|
||||
File = /sensitive-data
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Job Scheduling
|
||||
|
||||
### 8.1 Daily Incremental
|
||||
|
||||
```conf
|
||||
Schedule {
|
||||
Name = DailyIncremental
|
||||
Run = Incremental daily at 02:00
|
||||
}
|
||||
```
|
||||
|
||||
### 8.2 Weekly Full
|
||||
|
||||
```conf
|
||||
Schedule {
|
||||
Name = WeeklyFull
|
||||
Run = Full weekly on Sunday at 02:00
|
||||
}
|
||||
```
|
||||
|
||||
### 8.3 Monthly Archive
|
||||
|
||||
```conf
|
||||
Schedule {
|
||||
Name = MonthlyArchive
|
||||
Run = Full 1st sun at 01:00
|
||||
Run = Incremental 2nd-4th sun at 01:00
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. Testing Configuration
|
||||
|
||||
### 9.1 Test Director
|
||||
|
||||
```bash
|
||||
sudo /opt/bacula/bin/bacula-dir -t -u bacula -g bacula
|
||||
```
|
||||
|
||||
### 9.2 Test Storage Daemon
|
||||
|
||||
```bash
|
||||
sudo /opt/bacula/bin/bacula-sd -t -u bacula -g bacula
|
||||
```
|
||||
|
||||
### 9.3 Test File Daemon
|
||||
|
||||
```bash
|
||||
sudo /opt/bacula/bin/bacula-fd -t -u bacula -g bacula
|
||||
```
|
||||
|
||||
### 9.4 Reload Configuration
|
||||
|
||||
After testing, reload:
|
||||
|
||||
```bash
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
* reload
|
||||
* quit
|
||||
```
|
||||
|
||||
Or restart services:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart bacula-dir
|
||||
sudo systemctl restart bacula-sd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 10. Monitoring and Maintenance
|
||||
|
||||
### 10.1 Job Status
|
||||
|
||||
```bash
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
* status director
|
||||
* show jobs
|
||||
* messages
|
||||
```
|
||||
|
||||
### 10.2 Volume Management
|
||||
|
||||
```bash
|
||||
* list volumes
|
||||
* label
|
||||
* delete volume=Volume-001
|
||||
```
|
||||
|
||||
### 10.3 Database Maintenance
|
||||
|
||||
```bash
|
||||
# Vacuum database
|
||||
sudo -u postgres psql -d bacula -c "VACUUM ANALYZE;"
|
||||
|
||||
# Check database size
|
||||
sudo -u postgres psql -d bacula -c "SELECT pg_size_pretty(pg_database_size('bacula'));"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- Bacula Main Manual: https://www.bacula.org/documentation/
|
||||
- Configuration Examples: `/opt/bacula/etc/` (after installation)
|
||||
|
||||
743
docs/alpha/components/bacula/BACULA-INSTALLATION.md
Normal file
743
docs/alpha/components/bacula/BACULA-INSTALLATION.md
Normal file
@@ -0,0 +1,743 @@
|
||||
# Bacula Installation Guide
|
||||
## For Calypso Backup Appliance
|
||||
|
||||
**Version:** 1.0
|
||||
**Based on:** [Bacula Community Installation Guide](https://www.bacula.org/whitepapers/CommunityInstallationGuide.pdf)
|
||||
**Target OS:** Ubuntu Server 24.04 LTS
|
||||
**Database:** PostgreSQL 14+
|
||||
|
||||
---
|
||||
|
||||
## 1. Introduction
|
||||
|
||||
This guide explains how to install and configure Bacula Community edition on the Calypso backup appliance. Bacula is used for backup job management, scheduling, and integration with the Calypso control plane.
|
||||
|
||||
**Note:** This installation is integrated with Calypso's PostgreSQL database and management system.
|
||||
|
||||
---
|
||||
|
||||
## 2. Prerequisites
|
||||
|
||||
### 2.1 System Requirements
|
||||
- Ubuntu Server 24.04 LTS (or compatible Debian-based system)
|
||||
- PostgreSQL 14+ (already installed by Calypso installer)
|
||||
- Root or sudo access
|
||||
- Network connectivity to download packages
|
||||
|
||||
### 2.2 Pre-Installation Checklist
|
||||
- [ ] PostgreSQL is installed and running
|
||||
- [ ] Calypso database is configured
|
||||
- [ ] Network access to Bacula repositories
|
||||
- [ ] Backup existing Bacula configuration (if upgrading)
|
||||
|
||||
---
|
||||
|
||||
## 3. Installation Methods
|
||||
|
||||
### 3.1 Method 1: Using Calypso Installer (Recommended)
|
||||
|
||||
The Calypso installer includes Bacula installation:
|
||||
|
||||
```bash
|
||||
sudo ./installer/alpha/install.sh
|
||||
```
|
||||
|
||||
Bacula will be installed automatically. Skip to **Section 5: Configuration** after installation.
|
||||
|
||||
### 3.2 Method 2: Manual Installation
|
||||
|
||||
If installing manually or Bacula was skipped during Calypso installation:
|
||||
|
||||
---
|
||||
|
||||
## 4. Manual Installation Steps
|
||||
|
||||
### 4.1 Install Required Packages
|
||||
|
||||
```bash
|
||||
# Update package lists
|
||||
sudo apt-get update
|
||||
|
||||
# Install transport for HTTPS repositories
|
||||
sudo apt-get install -y apt-transport-https
|
||||
```
|
||||
|
||||
### 4.2 Import GPG Key
|
||||
|
||||
Bacula packages are signed with a GPG key. Import it:
|
||||
|
||||
```bash
|
||||
cd /tmp
|
||||
wget https://www.bacula.org/downloads/Bacula-4096-Distribution-Verification-key.asc
|
||||
sudo apt-key add Bacula-4096-Distribution-Verification-key.asc
|
||||
rm Bacula-4096-Distribution-Verification-key.asc
|
||||
```
|
||||
|
||||
**Note:** For newer Ubuntu versions, you may need to use:
|
||||
|
||||
```bash
|
||||
# For Ubuntu 24.04+
|
||||
wget -qO - https://www.bacula.org/downloads/Bacula-4096-Distribution-Verification-key.asc | \
|
||||
sudo gpg --dearmor -o /usr/share/keyrings/bacula-archive-keyring.gpg
|
||||
```
|
||||
|
||||
### 4.3 Configure Bacula Repository
|
||||
|
||||
Create repository configuration file:
|
||||
|
||||
```bash
|
||||
sudo nano /etc/apt/sources.list.d/Bacula-Community.list
|
||||
```
|
||||
|
||||
Add the following (replace placeholders):
|
||||
|
||||
```bash
|
||||
# Bacula Community Repository
|
||||
deb [arch=amd64] https://www.bacula.org/packages/@access-key@/debs/@bacula-version@ @ubuntu-version@ main
|
||||
```
|
||||
|
||||
**Example for Ubuntu 24.04 (Noble) with Bacula 13.0.1:**
|
||||
|
||||
```bash
|
||||
# Bacula Community Repository
|
||||
deb [arch=amd64] https://www.bacula.org/packages/YOUR_ACCESS_KEY/debs/13.0.1 noble main
|
||||
```
|
||||
|
||||
**Where:**
|
||||
- `@access-key@` - Your personalized access key from Bacula registration
|
||||
- `@bacula-version@` - Bacula version (e.g., 13.0.1)
|
||||
- `@ubuntu-version@` - Ubuntu codename (e.g., `noble` for 24.04)
|
||||
|
||||
**Note:** You need to register at [Bacula.org](https://www.bacula.org) to get your access key.
|
||||
|
||||
### 4.4 Alternative: Using Distribution Packages
|
||||
|
||||
If you don't have a Bacula access key, you can use Ubuntu's default repository:
|
||||
|
||||
```bash
|
||||
# Add to /etc/apt/sources.list.d/Bacula-Community.list
|
||||
deb http://archive.ubuntu.com/ubuntu noble universe
|
||||
```
|
||||
|
||||
Then install from Ubuntu repository:
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y bacula-postgresql
|
||||
```
|
||||
|
||||
**Note:** Ubuntu repository may have older versions. For latest features, use official Bacula repository.
|
||||
|
||||
### 4.5 Update Package Lists
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
### 4.6 Install PostgreSQL (if not installed)
|
||||
|
||||
Calypso installer should have already installed PostgreSQL. If not:
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y postgresql postgresql-client postgresql-contrib
|
||||
sudo systemctl enable postgresql
|
||||
sudo systemctl start postgresql
|
||||
```
|
||||
|
||||
### 4.7 Install Bacula Packages
|
||||
|
||||
Install Bacula with PostgreSQL backend:
|
||||
|
||||
```bash
|
||||
sudo apt-get install -y bacula-postgresql
|
||||
```
|
||||
|
||||
During installation, you'll be prompted:
|
||||
- **Configure database for bacula-postgresql with dbconfig-common?** → Choose **Yes**
|
||||
- Enter and confirm database password
|
||||
|
||||
This will:
|
||||
- Create Bacula database
|
||||
- Create Bacula database user
|
||||
- Initialize database schema
|
||||
- Configure basic Bacula services
|
||||
|
||||
### 4.8 Install Additional Components (Optional)
|
||||
|
||||
```bash
|
||||
# Install Bacula client (for local backups)
|
||||
sudo apt-get install -y bacula-client
|
||||
|
||||
# Install Bacula console (management tool)
|
||||
sudo apt-get install -y bacula-console
|
||||
|
||||
# Install Bacula Storage Daemon
|
||||
sudo apt-get install -y bacula-sd
|
||||
|
||||
# Install aligned plugin (for ZFS deduplication)
|
||||
sudo apt-get install -y bacula-aligned
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Post-Installation Configuration
|
||||
|
||||
### 5.1 Verify Installation
|
||||
|
||||
Check installed packages:
|
||||
|
||||
```bash
|
||||
dpkg -l | grep bacula
|
||||
```
|
||||
|
||||
Check services:
|
||||
|
||||
```bash
|
||||
sudo systemctl status bacula-dir
|
||||
sudo systemctl status bacula-sd
|
||||
sudo systemctl status bacula-fd
|
||||
```
|
||||
|
||||
### 5.2 Directory Structure
|
||||
|
||||
Bacula installs to `/opt/bacula/`:
|
||||
|
||||
```
|
||||
/opt/bacula/
|
||||
bin/ - Bacula binaries
|
||||
etc/ - Configuration files
|
||||
lib/ - Shared libraries
|
||||
plugins/ - Plugins (bpipe, aligned, etc.)
|
||||
scripts/ - Helper scripts
|
||||
working/ - Temporary files, PID files
|
||||
```
|
||||
|
||||
### 5.3 Configuration Files
|
||||
|
||||
Main configuration files:
|
||||
|
||||
- `/opt/bacula/etc/bacula-dir.conf` - Director configuration
|
||||
- `/opt/bacula/etc/bacula-sd.conf` - Storage Daemon configuration
|
||||
- `/opt/bacula/etc/bacula-fd.conf` - File Daemon configuration
|
||||
- `/opt/bacula/etc/bconsole.conf` - Console configuration
|
||||
|
||||
### 5.4 Database Configuration
|
||||
|
||||
Bacula uses PostgreSQL database. Verify connection:
|
||||
|
||||
```bash
|
||||
# Check database exists
|
||||
sudo -u postgres psql -l | grep bacula
|
||||
|
||||
# Connect to Bacula database
|
||||
sudo -u postgres psql -d bacula
|
||||
|
||||
# List tables
|
||||
\dt
|
||||
|
||||
# Exit
|
||||
\q
|
||||
```
|
||||
|
||||
### 5.5 Test Configuration
|
||||
|
||||
Test each component:
|
||||
|
||||
```bash
|
||||
# Test Director configuration
|
||||
sudo /opt/bacula/bin/bacula-dir -t -u bacula -g bacula
|
||||
|
||||
# Test Storage Daemon configuration
|
||||
sudo /opt/bacula/bin/bacula-sd -t -u bacula -g bacula
|
||||
|
||||
# Test File Daemon configuration
|
||||
sudo /opt/bacula/bin/bacula-fd -t -u bacula -g bacula
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6. Integration with Calypso
|
||||
|
||||
### 6.1 Database Integration
|
||||
|
||||
Calypso can access Bacula database directly. Ensure Calypso database user has access:
|
||||
|
||||
```bash
|
||||
# Grant access to Calypso user (if using separate databases)
|
||||
sudo -u postgres psql -c "GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO calypso;" bacula
|
||||
```
|
||||
|
||||
### 6.2 bconsole Integration
|
||||
|
||||
Calypso uses `bconsole` to execute Bacula commands. Verify bconsole works:
|
||||
|
||||
```bash
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
```
|
||||
|
||||
In bconsole, test commands:
|
||||
|
||||
```
|
||||
* status director
|
||||
* show jobs
|
||||
* quit
|
||||
```
|
||||
|
||||
### 6.3 Service Management
|
||||
|
||||
Bacula services are managed via systemd:
|
||||
|
||||
```bash
|
||||
# Start services
|
||||
sudo systemctl start bacula-dir
|
||||
sudo systemctl start bacula-sd
|
||||
sudo systemctl start bacula-fd
|
||||
|
||||
# Enable on boot
|
||||
sudo systemctl enable bacula-dir
|
||||
sudo systemctl enable bacula-sd
|
||||
sudo systemctl enable bacula-fd
|
||||
|
||||
# Check status
|
||||
sudo systemctl status bacula-dir
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. Basic Configuration
|
||||
|
||||
### 7.1 Director Configuration
|
||||
|
||||
Edit `/opt/bacula/etc/bacula-dir.conf`:
|
||||
|
||||
```bash
|
||||
sudo nano /opt/bacula/etc/bacula-dir.conf
|
||||
```
|
||||
|
||||
Key sections to configure:
|
||||
- **Director** - Director name and password
|
||||
- **Catalog** - Database connection
|
||||
- **Storage** - Storage daemon connection
|
||||
- **Pool** - Backup pool configuration
|
||||
- **Schedule** - Backup schedules
|
||||
- **Client** - Client definitions
|
||||
|
||||
### 7.2 Storage Daemon Configuration
|
||||
|
||||
Edit `/opt/bacula/etc/bacula-sd.conf`:
|
||||
|
||||
```bash
|
||||
sudo nano /opt/bacula/etc/bacula-sd.conf
|
||||
```
|
||||
|
||||
Key sections:
|
||||
- **Storage** - Storage daemon name
|
||||
- **Director** - Director connection
|
||||
- **Device** - Storage devices (disk, tape, etc.)
|
||||
|
||||
### 7.3 File Daemon Configuration
|
||||
|
||||
Edit `/opt/bacula/etc/bacula-fd.conf`:
|
||||
|
||||
```bash
|
||||
sudo nano /opt/bacula/etc/bacula-fd.conf
|
||||
```
|
||||
|
||||
Key sections:
|
||||
- **Director** - Director connection
|
||||
- **FileDaemon** - File daemon settings
|
||||
|
||||
### 7.4 Reload Configuration
|
||||
|
||||
After editing configuration:
|
||||
|
||||
```bash
|
||||
# Test configuration first
|
||||
sudo /opt/bacula/bin/bacula-dir -t -u bacula -g bacula
|
||||
|
||||
# If test passes, reload via bconsole
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
* reload
|
||||
* quit
|
||||
|
||||
# Or restart service
|
||||
sudo systemctl restart bacula-dir
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Storage Device Configuration
|
||||
|
||||
### 8.1 Disk Storage
|
||||
|
||||
Configure disk-based storage in `bacula-sd.conf`:
|
||||
|
||||
```
|
||||
Device {
|
||||
Name = FileStorage
|
||||
Media Type = File
|
||||
Archive Device = /srv/calypso/backups
|
||||
LabelMedia = yes
|
||||
Random Access = yes
|
||||
AutomaticMount = yes
|
||||
RemovableMedia = no
|
||||
AlwaysOpen = no
|
||||
}
|
||||
```
|
||||
|
||||
### 8.2 Tape Storage
|
||||
|
||||
For physical tape libraries:
|
||||
|
||||
```
|
||||
Device {
|
||||
Name = TapeDrive-0
|
||||
Media Type = LTO-8
|
||||
Archive Device = /dev/nst0
|
||||
AutomaticMount = yes
|
||||
AlwaysOpen = no
|
||||
RemovableMedia = yes
|
||||
RandomAccess = no
|
||||
MaximumFileSize = 10GB
|
||||
MaximumBlockSize = 524288
|
||||
MaximumOpenWait = 10 min
|
||||
MaximumRewindWait = 2 min
|
||||
MaximumOpenVolumes = 1
|
||||
LabelMedia = yes
|
||||
AutoChanger = yes
|
||||
ChangerDevice = /dev/sg0
|
||||
ChangerCommand = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. Client Configuration
|
||||
|
||||
### 9.1 Adding a Client in Director
|
||||
|
||||
Edit `/opt/bacula/etc/bacula-dir.conf` and add:
|
||||
|
||||
```
|
||||
Client {
|
||||
Name = client-fd
|
||||
Address = client.example.com
|
||||
FDPort = 9102
|
||||
Catalog = MyCatalog
|
||||
Password = "client-password"
|
||||
File Retention = 60 days
|
||||
Job Retention = 6 months
|
||||
AutoPrune = yes
|
||||
}
|
||||
```
|
||||
|
||||
### 9.2 Installing File Daemon on Client
|
||||
|
||||
On the client machine:
|
||||
|
||||
```bash
|
||||
# Install client package
|
||||
sudo apt-get install -y bacula-client
|
||||
|
||||
# Edit configuration
|
||||
sudo nano /opt/bacula/etc/bacula-fd.conf
|
||||
```
|
||||
|
||||
Configure:
|
||||
|
||||
```
|
||||
Director {
|
||||
Name = bacula-dir
|
||||
Password = "client-password"
|
||||
}
|
||||
|
||||
FileDaemon {
|
||||
Name = client-fd
|
||||
FDport = 9102
|
||||
WorkingDirectory = /opt/bacula/working
|
||||
Pid Directory = /opt/bacula/working
|
||||
Maximum Concurrent Jobs = 2
|
||||
Plugin Directory = /opt/bacula/plugins
|
||||
}
|
||||
|
||||
Messages {
|
||||
Name = Standard
|
||||
director = bacula-dir = all, !skipped, !restored
|
||||
}
|
||||
```
|
||||
|
||||
### 9.3 Test and Start Client
|
||||
|
||||
```bash
|
||||
# Test configuration
|
||||
sudo /opt/bacula/bin/bacula-fd -t -u bacula -g bacula
|
||||
|
||||
# Start service
|
||||
sudo systemctl start bacula-fd
|
||||
sudo systemctl enable bacula-fd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 10. Verification
|
||||
|
||||
### 10.1 Check Services
|
||||
|
||||
```bash
|
||||
# Check all Bacula services
|
||||
sudo systemctl status bacula-dir
|
||||
sudo systemctl status bacula-sd
|
||||
sudo systemctl status bacula-fd
|
||||
|
||||
# Check logs
|
||||
sudo journalctl -u bacula-dir -f
|
||||
sudo journalctl -u bacula-sd -f
|
||||
```
|
||||
|
||||
### 10.2 Test with bconsole
|
||||
|
||||
```bash
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
```
|
||||
|
||||
Test commands:
|
||||
|
||||
```
|
||||
* status director
|
||||
* status storage
|
||||
* status client=client-fd
|
||||
* show jobs
|
||||
* show pools
|
||||
* show volumes
|
||||
* quit
|
||||
```
|
||||
|
||||
### 10.3 Run Test Backup
|
||||
|
||||
Create a test job in Director configuration, then:
|
||||
|
||||
```bash
|
||||
sudo -u bacula /opt/bacula/bin/bconsole
|
||||
* run job=TestJob
|
||||
* messages
|
||||
* quit
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 11. Upgrade Procedures
|
||||
|
||||
### 11.1 Backup Configuration
|
||||
|
||||
Before upgrading:
|
||||
|
||||
```bash
|
||||
# Backup configuration files
|
||||
sudo cp -r /opt/bacula/etc /opt/bacula/etc.backup.$(date +%Y%m%d)
|
||||
|
||||
# Backup database
|
||||
sudo -u bacula /opt/bacula/scripts/make_catalog_backup.pl MyCatalog
|
||||
sudo cp /opt/bacula/working/bacula.sql /tmp/bacula-backup-$(date +%Y%m%d).sql
|
||||
```
|
||||
|
||||
### 11.2 Minor Upgrade
|
||||
|
||||
For minor version upgrades (e.g., 13.0.1 → 13.0.2):
|
||||
|
||||
```bash
|
||||
# Update repository version in /etc/apt/sources.list.d/Bacula-Community.list
|
||||
# Update package lists
|
||||
sudo apt-get update
|
||||
|
||||
# Upgrade packages
|
||||
sudo apt-get upgrade bacula-postgresql
|
||||
```
|
||||
|
||||
### 11.3 Major Upgrade
|
||||
|
||||
For major upgrades, follow Bacula's upgrade documentation. Generally:
|
||||
|
||||
1. Backup everything
|
||||
2. Update repository configuration
|
||||
3. Upgrade packages
|
||||
4. Run database migration scripts (if provided)
|
||||
5. Test configuration
|
||||
6. Restart services
|
||||
|
||||
---
|
||||
|
||||
## 12. Troubleshooting
|
||||
|
||||
### 12.1 Common Issues
|
||||
|
||||
**Issue: Database connection failed**
|
||||
|
||||
```bash
|
||||
# Check PostgreSQL is running
|
||||
sudo systemctl status postgresql
|
||||
|
||||
# Check database exists
|
||||
sudo -u postgres psql -l | grep bacula
|
||||
|
||||
# Test connection
|
||||
sudo -u postgres psql -d bacula -c "SELECT version();"
|
||||
```
|
||||
|
||||
**Issue: Service won't start**
|
||||
|
||||
```bash
|
||||
# Check configuration syntax
|
||||
sudo /opt/bacula/bin/bacula-dir -t -u bacula -g bacula
|
||||
|
||||
# Check logs
|
||||
sudo journalctl -u bacula-dir -n 50
|
||||
|
||||
# Check permissions
|
||||
ls -la /opt/bacula/working
|
||||
```
|
||||
|
||||
**Issue: bconsole connection failed**
|
||||
|
||||
```bash
|
||||
# Check Director is running
|
||||
sudo systemctl status bacula-dir
|
||||
|
||||
# Check network connectivity
|
||||
telnet localhost 9101
|
||||
|
||||
# Verify bconsole.conf
|
||||
cat /opt/bacula/etc/bconsole.conf
|
||||
```
|
||||
|
||||
### 12.2 Log Locations
|
||||
|
||||
- **Systemd logs:** `sudo journalctl -u bacula-dir`
|
||||
- **Bacula logs:** `/opt/bacula/working/bacula.log`
|
||||
- **PostgreSQL logs:** `/var/log/postgresql/`
|
||||
|
||||
---
|
||||
|
||||
## 13. Security Considerations
|
||||
|
||||
### 13.1 Passwords
|
||||
|
||||
- Change default passwords in configuration files
|
||||
- Use strong passwords for Director, Storage, and Client
|
||||
- Store passwords securely (consider using Calypso's secret management)
|
||||
|
||||
### 13.2 File Permissions
|
||||
|
||||
```bash
|
||||
# Set proper permissions
|
||||
sudo chown -R bacula:bacula /opt/bacula/etc
|
||||
sudo chmod 600 /opt/bacula/etc/*.conf
|
||||
sudo chmod 755 /opt/bacula/bin/*
|
||||
```
|
||||
|
||||
### 13.3 Network Security
|
||||
|
||||
- Use firewall rules to restrict access
|
||||
- Consider VPN for remote clients
|
||||
- Use TLS/SSL for network communication (if configured)
|
||||
|
||||
---
|
||||
|
||||
## 14. Integration with Calypso API
|
||||
|
||||
### 14.1 Database Access
|
||||
|
||||
Calypso can query Bacula database directly:
|
||||
|
||||
```sql
|
||||
-- Example: List recent jobs
|
||||
SELECT JobId, Job, Level, JobStatus, StartTime, EndTime
|
||||
FROM Job
|
||||
ORDER BY StartTime DESC
|
||||
LIMIT 10;
|
||||
```
|
||||
|
||||
### 14.2 bconsole Commands
|
||||
|
||||
Calypso executes bconsole commands via API:
|
||||
|
||||
```bash
|
||||
# Example command execution
|
||||
echo "status director" | sudo -u bacula /opt/bacula/bin/bconsole
|
||||
```
|
||||
|
||||
### 14.3 Configuration Management
|
||||
|
||||
Calypso can:
|
||||
- Read Bacula configuration files
|
||||
- Update configuration via API
|
||||
- Apply configuration changes
|
||||
- Monitor Bacula services
|
||||
|
||||
---
|
||||
|
||||
## 15. Best Practices
|
||||
|
||||
### 15.1 Regular Maintenance
|
||||
|
||||
- **Database backups:** Regular catalog backups
|
||||
- **Log rotation:** Configure log rotation
|
||||
- **Volume management:** Regular volume labeling and testing
|
||||
- **Job monitoring:** Monitor job success/failure rates
|
||||
|
||||
### 15.2 Performance Tuning
|
||||
|
||||
- Adjust concurrent jobs based on system resources
|
||||
- Configure appropriate block sizes for tape devices
|
||||
- Use compression for network backups
|
||||
- Optimize database queries
|
||||
|
||||
### 15.3 Monitoring
|
||||
|
||||
- Set up alerting for failed jobs
|
||||
- Monitor storage capacity
|
||||
- Track backup completion times
|
||||
- Review logs regularly
|
||||
|
||||
---
|
||||
|
||||
## 16. References
|
||||
|
||||
- **Official Bacula Documentation:** https://www.bacula.org/documentation/
|
||||
- **Bacula Community Installation Guide:** https://www.bacula.org/whitepapers/CommunityInstallationGuide.pdf
|
||||
- **Bacula Concept Guide:** https://www.bacula.org/whitepapers/ConceptGuide.pdf
|
||||
- **Bacula Main Manual:** https://www.bacula.org/documentation/documentation/
|
||||
- **Bacula Support:** https://www.bacula.org/support
|
||||
|
||||
---
|
||||
|
||||
## 17. Appendix
|
||||
|
||||
### 17.1 Default Ports
|
||||
|
||||
- **Director:** 9101
|
||||
- **Storage Daemon:** 9103
|
||||
- **File Daemon:** 9102
|
||||
- **Console:** Connects to Director on 9101
|
||||
|
||||
### 17.2 Default Users
|
||||
|
||||
- **System User:** `bacula`
|
||||
- **Database User:** `bacula`
|
||||
- **Database Name:** `bacula`
|
||||
|
||||
### 17.3 Important Files
|
||||
|
||||
- **Configuration:** `/opt/bacula/etc/`
|
||||
- **Binaries:** `/opt/bacula/bin/`
|
||||
- **Working Directory:** `/opt/bacula/working/`
|
||||
- **Logs:** `/opt/bacula/working/bacula.log`
|
||||
- **Scripts:** `/opt/bacula/scripts/`
|
||||
|
||||
---
|
||||
|
||||
## Document History
|
||||
|
||||
| Version | Date | Author | Changes |
|
||||
|---------|------|--------|---------|
|
||||
| 1.0 | 2025-01-XX | Development Team | Initial Bacula installation guide for Calypso |
|
||||
|
||||
86
docs/alpha/components/bacula/README.md
Normal file
86
docs/alpha/components/bacula/README.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Bacula Integration Documentation
|
||||
## For Calypso Backup Appliance
|
||||
|
||||
This directory contains documentation for installing, configuring, and integrating Bacula backup software with the Calypso appliance.
|
||||
|
||||
---
|
||||
|
||||
## Documents
|
||||
|
||||
### Installation
|
||||
- **BACULA-INSTALLATION.md** - Complete installation guide for Bacula Community edition
|
||||
- Manual installation steps
|
||||
- Repository configuration
|
||||
- Package installation
|
||||
- Post-installation setup
|
||||
- Integration with Calypso
|
||||
|
||||
### Configuration
|
||||
- **BACULA-CONFIGURATION.md** - Advanced configuration guide
|
||||
- Director configuration
|
||||
- Storage Daemon configuration
|
||||
- File Daemon configuration
|
||||
- Job scheduling
|
||||
- Integration with Calypso storage
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Installation via Calypso Installer
|
||||
|
||||
```bash
|
||||
# Bacula is included in Calypso installer
|
||||
sudo ./installer/alpha/install.sh
|
||||
```
|
||||
|
||||
### Manual Installation
|
||||
|
||||
See `BACULA-INSTALLATION.md` for detailed steps.
|
||||
|
||||
### Basic Configuration
|
||||
|
||||
1. Edit `/opt/bacula/etc/bacula-dir.conf`
|
||||
2. Configure Director, Catalog, Storage, Pool resources
|
||||
3. Test configuration: `sudo /opt/bacula/bin/bacula-dir -t`
|
||||
4. Reload: `sudo systemctl restart bacula-dir`
|
||||
|
||||
---
|
||||
|
||||
## Integration Points
|
||||
|
||||
### Database
|
||||
- Bacula uses PostgreSQL database (can share with Calypso or separate)
|
||||
- Calypso can query Bacula database directly
|
||||
- Database name: `bacula` (default)
|
||||
|
||||
### Storage
|
||||
- Bacula can use Calypso-managed ZFS datasets
|
||||
- Storage location: `/srv/calypso/backups/`
|
||||
- Integration via Calypso Storage API
|
||||
|
||||
### Management
|
||||
- Calypso API executes bconsole commands
|
||||
- Job monitoring via Calypso dashboard
|
||||
- Configuration management via Calypso UI
|
||||
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
- **Official Bacula Documentation:** https://www.bacula.org/documentation/
|
||||
- **Bacula Community Installation Guide:** https://www.bacula.org/whitepapers/CommunityInstallationGuide.pdf
|
||||
- **Bacula Concept Guide:** https://www.bacula.org/whitepapers/ConceptGuide.pdf
|
||||
|
||||
---
|
||||
|
||||
## Support
|
||||
|
||||
For Bacula-specific issues:
|
||||
- Bacula Community Support: https://www.bacula.org/support
|
||||
- Bacula Mailing Lists: https://www.bacula.org/community/mailing-lists/
|
||||
|
||||
For Calypso integration issues:
|
||||
- See main Calypso documentation: `docs/alpha/`
|
||||
- Check Calypso logs: `sudo journalctl -u calypso-api`
|
||||
|
||||
Reference in New Issue
Block a user