Skip to content

System

Manage system-level operations including backups, maintenance tasks, and health monitoring.


🖥️ System Administration Dashboard Screenshot

Access the system dashboard at Admin > System to view:

  • System health status
  • Resource utilization
  • Active background jobs
  • Recent system events

🖥️ Backup Management Interface Screenshot
TypeContentsUse Case
FullDatabase + filesDisaster recovery
Database OnlyDatabase without uploadsQuick snapshots
IncrementalChanges since last backupEfficient storage
  1. Navigate to Admin > System > Backups
  2. Click Create Backup
  3. Select backup type
  4. Optionally add a description
  5. Click Start Backup
  6. Download when complete

Configure scheduled backups:

SettingDescriptionExample
ScheduleCron expression or presetDaily at 2:00 AM
RetentionNumber of backups to keep30
DestinationLocal or S3 storageS3 bucket
NotificationEmail on completion/failure[email protected]

Schedule Presets:

  • Hourly
  • Daily (2:00 AM)
  • Weekly (Sunday 2:00 AM)
  • Custom cron expression

Local Storage:

  • Stored in ./pb_data/backups/
  • Accessible for download via admin panel
  • Limited by local disk space

S3-Compatible Storage:

  • Requires S3 configuration in Services
  • Automatic upload after backup
  • Better for disaster recovery
  1. Navigate to Admin > System > Backups
  2. Select the backup to restore
  3. Click Restore
  4. Confirm the operation
  5. Wait for restoration to complete
  6. System will restart automatically
  • Schedule daily backups minimum
  • Keep at least 7 days of backups
  • Store backups off-site (S3)
  • Test restoration periodically
  • Document backup procedures

🖥️ Database Management Interface Screenshot

View database statistics:

MetricDescription
SizeTotal database file size
TablesNumber of collections
RecordsTotal record count
ConnectionsActive database connections

Optimize database performance:

  1. Navigate to Admin > System > Database
  2. Click Optimize Database
  3. System runs VACUUM and ANALYZE
  4. Review optimization results

Run optimization:

  • After large deletions
  • Monthly for regular maintenance
  • When performance degrades

Export data for migration or analysis:

  1. Select collections to export
  2. Choose format (JSON, CSV)
  3. Click Export
  4. Download the export file

🖥️ Background Jobs Queue Screenshot
JobPurposeFrequency
BackupAutomated backupsScheduled
CleanupTemp file removalDaily
ExportAsync PDF generationOn-demand
SyncReal-time collaboration syncContinuous

View and manage background jobs:

StatusDescription
PendingWaiting to run
RunningCurrently executing
CompletedFinished successfully
FailedFinished with error

For failed jobs:

  1. View error details
  2. Retry the job
  3. Or cancel and investigate

Monitor system components:

ComponentChecks
DatabaseConnection, query performance
StorageDisk space, file access
MemoryUsage, available
CPUUtilization
NetworkConnectivity

Programmatic health check:

Terminal window
curl https://your-spear-instance/api/health

Response:

{
"status": "healthy",
"components": {
"database": "healthy",
"storage": "healthy",
"memory": "healthy"
},
"version": "1.0.0",
"uptime": "5d 12h 30m"
}

Export metrics for external monitoring:

Terminal window
curl https://your-spear-instance/api/metrics

Compatible with Prometheus, Grafana, etc.


🖥️ Log Viewer Interface Screenshot
LogContents
ApplicationGeneral application events
AccessHTTP request logs
ErrorError and exception details
AuditSecurity-relevant events
  1. Navigate to Admin > System > Logs
  2. Select log type
  3. Filter by date, level, or search
  4. Export if needed

Configure log retention:

SettingDefaultDescription
Application Logs30 daysGeneral logs
Access Logs7 daysRequest logs
Error Logs90 daysError details
Audit Logs1 yearSecurity events

Forward logs to external services:

Terminal window
# Environment variable configuration
LOG_OUTPUT=stdout
LOG_FORMAT=json
LOG_LEVEL=info

Compatible with:

  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • Splunk
  • CloudWatch
  • Datadog

During maintenance, users see a maintenance page:

  1. Navigate to Admin > System > Maintenance
  2. Set maintenance message
  3. Set expected duration (optional)
  4. Click Enable Maintenance Mode

With maintenance mode enabled:

  • Database migrations
  • Large data imports
  • System upgrades
  • Performance optimization
  1. Complete maintenance tasks
  2. Navigate to Admin > System > Maintenance
  3. Click Disable Maintenance Mode
  4. Verify system is operational

View current version:

  • Navigate to Admin > System > About
  • Or run ./spear --version
  1. Download new release
  2. Enable maintenance mode
  3. Create backup
  4. Stop current instance
  5. Replace binary
  6. Start new instance
  7. Verify migrations ran
  8. Disable maintenance mode
  9. Verify functionality

Set resource limits via environment variables:

Terminal window
# Memory limit
SPEAR_MAX_MEMORY=2GB
# File upload limit
SPEAR_MAX_UPLOAD_SIZE=50MB
# Concurrent requests
SPEAR_MAX_CONNECTIONS=100
# Background job workers
SPEAR_JOB_WORKERS=4

View resource usage vs limits:

  1. Navigate to Admin > System > Resources
  2. Review current utilization
  3. Adjust limits as needed

  1. Check logs for errors
  2. Verify disk space available
  3. Check port availability
  4. Verify encryption key set
  5. Check file permissions
  1. Review database size
  2. Run database optimization
  3. Check disk space
  4. Review background job queue
  5. Consider resource limits
  1. Check disk space
  2. Verify S3 credentials (if applicable)
  3. Review backup job logs
  4. Test manual backup
  5. Check file permissions
  1. Review active connections
  2. Check for large file uploads
  3. Review background job queue
  4. Consider memory limits
  5. Restart if necessary