Backup & Restore Module Documentation
Table of Contents
- Module Overview (Technical)
- Module Overview (Commercial/Business)
- Module Overview (End User/Administrator)
- Configuration Sections
- Settings Reference
- Common Scenarios & Examples
- Limitations & Important Notes
- Troubleshooting Tips
- Glossary
---
1. Module Overview (Technical)
What Is Backup & Restore?
Backup & Restore is a data protection module that creates and manages backup jobs for system configuration and media files. It supports multiple storage destinations and data type selection with automatic retention management.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Backup & Restore Architecture │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Backup Jobs │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ Job: Daily Backup │ │
│ │ ┌────────────────────────────────────────────────────┐ │ │
│ │ │ │ │ │
│ │ │ Scope: All Tenants │ │ │
│ │ │ │ │ │
│ │ │ Data Types: │ │ │
│ │ │ ├─ ✓ CDR Records │ │ │
│ │ │ ├─ ✓ Recordings │ │ │
│ │ │ ├─ ✓ Voicemails │ │ │
│ │ │ └─ ✓ Faxes │ │ │
│ │ │ │ │ │
│ │ │ Schedule: Automatic (Daily) │ │ │
│ │ │ Retention: 7 backups │ │ │
│ │ │ │ │ │
│ │ └────────────────────────────────────────────────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ Stores backups │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Storage Destinations │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Local │ │ S3 Storage │ │ FTP/SFTP │ │ │
│ │ │ Filesystem │ │ AWS/MinIO │ │ Server │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ Available backups │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Backups List │ │
│ │ │ │
│ │ backup_2024-01-16_daily.tar.gz 512 MB ⬇️ 🗑️ │ │
│ │ backup_2024-01-15_daily.tar.gz 498 MB ⬇️ 🗑️ │ │
│ │ backup_2024-01-14_daily.tar.gz 505 MB ⬇️ 🗑️ │ │
│ │ │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
Key Tables
| Table | Purpose |
|---|
public.backup_jobs | Job configurations | |
public.backup_history | Backup records |
Key Files
| File | Description |
|---|
modules/backupRestore/ | Frontend module | |
| Backup archives | .tar.gz files |
---
2. Module Overview (Commercial/Business)
Business Value
Backup & Restore provides data protection:
| Without Backups | With Backups |
|---|
| Data loss risk | Recoverable | |
| Manual exports | Automated jobs | |
| Single location | Multiple destinations | |
| No retention | Automatic cleanup |
Use Cases
- Disaster Recovery
- System failure recovery
- Configuration restoration
- Data Compliance
- CDR archival
- Record retention
- Migration
- Server migration
- Cloud transfer
- Tenant Backup
- Per-tenant exports
- Selective backup
Feature Highlights
| Feature | Benefit |
|---|
| Multiple Storage | Local, S3, FTP | |
| Selective Data | Choose what to backup | |
| Tenant Scope | All or specific tenant | |
| Retention | Automatic cleanup | |
| Run Now | Manual execution | |
| Download | Direct file download |
---
3. Module Overview (End User/Administrator)
What Can You Do?
- Create backup jobs
- Configure storage destinations
- Select data types to include
- Set retention limits
- Run backups manually
- Download backup files
- Restore from backup
- Delete old backups
Backup & Restore - Main View
┌─────────────────────────────────────────────────────────────────┐
│ Backup & Restore │
├─────────────────────────────────────────────────────────────────┤
│ │
│ [General] [Storage] [Backups] │
│ │
│ [+ New Backup Job] │
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Name │ Type │ Storage │ Last Run │ Status │ │
│ ├──────────────┼───────────┼───────────┼──────────┼────────┤ │
│ │ Daily Backup │ All Tenants│ S3 │ Today │● Success│ │
│ │ Weekly Full │ All Tenants│ Local │ Jan 14 │● Success│ │
│ │ Tenant A │ Specific │ FTP │ Jan 16 │● Success│ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ Actions: [▶ Run Now] [✏️ Edit] [🗑️ Delete] │
│ │
└─────────────────────────────────────────────────────────────────┘
Create/Edit Backup Job
┌─────────────────────────────────────────────────────────────────┐
│ New Backup Job │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ▼ Backup Configuration │
│ Configure the scope and settings for this backup job │
│ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ ││
│ │ Job Name: [Daily Backup ] ││
│ │ Descriptive name for this backup job ││
│ │ ││
│ │ Scope: [All Tenants ▼] ││
│ │ All Tenants | Specific Tenant ││
│ │ ││
│ │ Run Automatically: [Disabled (Manual Run Only) ▼] ││
│ │ Define how and when this backup should run ││
│ │ ││
│ │ Retention Limit: [7 ] backups ││
│ │ Maximum number of backup files to keep ││
│ │ ││
│ │ ────────────────────────────────────────────────────────── ││
│ │ ││
│ │ Include in Backup: ││
│ │ ✓ Include CDR Records ││
│ │ ✓ Include Recordings ││
│ │ ✓ Include Voicemails ││
│ │ ✓ Include Faxes ││
│ │ ││
│ └─────────────────────────────────────────────────────────────┘│
│ │
│ ▼ Storage Configuration │
│ Configure where the backups will be stored │
│ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ ││
│ │ Storage Type: [S3 Compatible Object Storage ▼] ││
│ │ Local Filesystem | S3 Compatible | FTP / SFTP ││
│ │ ││
│ │ S3 Bucket: [pbx-backups ] ││
│ │ Region: [us-east-1 ] ││
│ │ Access Key: [AKIAXXXXXXXX ] ││
│ │ Secret Key: [********************************] ││
│ │ ││
│ └─────────────────────────────────────────────────────────────┘│
│ │
│ ▼ Console Execution │
│ Command to run this backup job from terminal │
│ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ $ ring2all backup run daily-backup ││
│ └─────────────────────────────────────────────────────────────┘│
│ │
│ [Save] [Cancel] │
│ │
└─────────────────────────────────────────────────────────────────┘
Backups Tab - Available Files
┌─────────────────────────────────────────────────────────────────┐
│ Backup & Restore │
├─────────────────────────────────────────────────────────────────┤
│ │
│ [General] [Storage] [Backups] │
│ │
│ Available Backups │
│ │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Filename │ Date │ Size │ │
│ ├────────────────────────────────────┼───────────┼─────────┤ │
│ │ backup_daily_2024-01-16_0800.tar.gz│ Jan 16 08:00│ 512 MB│ │
│ │ backup_daily_2024-01-15_0800.tar.gz│ Jan 15 08:00│ 498 MB│ │
│ │ backup_daily_2024-01-14_0800.tar.gz│ Jan 14 08:00│ 505 MB│ │
│ │ backup_daily_2024-01-13_0800.tar.gz│ Jan 13 08:00│ 492 MB│ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ Actions: [⬇️ Download] [🔄 Restore] [🗑️ Delete] │
│ │
└─────────────────────────────────────────────────────────────────┘
Quick Tips
TIP
Retention: Set retention to avoid filling storage.
TIP
Recordings: Exclude recordings for smaller backups.
WARNING
Restore: Restoring will overwrite current data!
---
4. Configuration Sections
Backup Configuration
| Field | Description |
|---|
| Job Name | Backup identifier | |
| Scope | All Tenants or Specific | |
| Run Automatically | Schedule or manual | |
| Retention Limit | Max backups to keep |
Data Selection
| Option | Description |
|---|
| CDR Records | Call history | |
| Recordings | Call recordings | |
| Voicemails | Voicemail messages | |
| Faxes | Fax files |
Storage Configuration
| Field | Description |
|---|
| Storage Type | Destination type | |
| S3 Bucket | Bucket name | |
| Region | AWS region | |
| Access Key | S3 credentials | |
| Secret Key | S3 secret | |
| Host | FTP hostname | |
| Port | FTP port | |
| User | FTP username | |
| Password | FTP password | |
| Path | Directory path |
---
5. Settings Reference
Storage Types
| Type | Description | Use Case |
|---|
| Local | Server filesystem | Quick access | |
| S3 | Object storage | Cloud backup | |
| FTP/SFTP | Remote server | Off-site storage |
Scope Options
| Scope | Description |
|---|
| All Tenants | Complete backup | |
| Specific Tenant | Single tenant only |
Data Type Impact on Size
| Data Type | Size Impact | Recommendation |
|---|
| CDR | Small | Always include | |
| Recordings | Large | Exclude if space limited | |
| Voicemails | Medium | Include for user recovery | |
| Faxes | Medium | Include if used |
Retention Guidelines
| Environment | Recommendation |
|---|
| Production | 7-30 days | |
| Development | 3-7 days | |
| Compliance | Per policy (90+ days) |
---
6. Common Scenarios & Examples
Scenario 1: Create Daily Backup Job
- Click New Backup Job
- Name = "Daily Backup"
- Scope = All Tenants
- Run Automatically = Daily
- Retention = 7 backups
- Check all data types
- Storage = S3, enter credentials
- Save
Scenario 2: Run Manual Backup
- Find backup job in list
- Click Run Now
- Wait for completion
- Go to Backups tab
- Download the new backup
Scenario 3: Restore from Backup
- Go to Backups tab
- Find desired backup file
- Click Restore
- Confirm restoration
- Wait for completion
- Verify restored data
Scenario 4: Tenant-Specific Backup
- Create New Backup Job
- Scope = Specific Tenant
- Select tenant from dropdown
- Configure data and storage
- Save
- Run Now or schedule
---
7. Limitations & Important Notes
Technical Notes
NOTE
Recordings: Large recordings increase backup size significantly.
NOTE
Restore Time: Large backups take longer to restore.
CAUTION
Restore Overwrites: Restoration replaces current data!
Best Practices
- Regular Backups: Schedule daily or weekly
- Multiple Destinations: Use S3 for redundancy
- Test Restores: Periodically verify backups work
- Retention Policy: Balance storage vs. history
- Off-site Storage: Use S3 or FTP for disaster recovery
Backup vs. Data Type
| Data Type | Database | Files |
|---|
| Configuration | Yes | - | |
| CDR | Yes | - | |
| Recordings | - | Yes (large) | |
| Voicemails | Yes | Yes | |
| Faxes | Yes | Yes |
---
8. Troubleshooting Tips
Common Issues
| Symptom | Possible Cause | Solution |
|---|
| Backup fails | Storage full | Increase storage | |
| S3 error | Bad credentials | Verify access key | |
| FTP error | Connection failed | Check host/port | |
| Large backup | Recordings included | Exclude or archive |
Check Backup Status
# View backup job status
ring2all backup status daily-backup
# List available backups
ring2all backup list
# Run backup manually
ring2all backup run daily-backup
Verify Storage
# Check local storage
df -h /var/backups
# Test S3 connection
aws s3 ls s3://pbx-backups/
# Test FTP connection
curl -u user:pass ftp://ftp.server.com/
---
9. Glossary
| Term | Definition |
|---|
| Backup Job | Configured backup task | |
| Retention | Number of backups to keep | |
| S3 | Object storage protocol | |
| Restore | Recovery from backup | |
| Scope | Backup coverage |
---
Lua Script Status ℹ️
System Module
| Component | Status |
|---|
| Backup & Restore | ℹ️ Data protection - no Lua handler required |
Backup & Restore is a system maintenance module. It manages backup jobs and restoration. No Lua handlers are used - backup operations are executed by the backend service.
---
Documentation last updated: January 2026