Ctrl K
ring2all.com

Backup & Restore Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. 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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              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

TablePurpose
public.backup_jobsJob configurations
public.backup_historyBackup records

Key Files

FileDescription
modules/backupRestore/Frontend module
Backup archives.tar.gz files
---

2. Module Overview (Commercial/Business)

Business Value

Backup & Restore provides data protection:

Without BackupsWith Backups
Data loss riskRecoverable
Manual exportsAutomated jobs
Single locationMultiple destinations
No retentionAutomatic cleanup

Use Cases

  1. Disaster Recovery
- System failure recovery

- Configuration restoration

  1. Data Compliance
- CDR archival

- Record retention

  1. Migration
- Server migration

- Cloud transfer

  1. Tenant Backup
- Per-tenant exports

- Selective backup

Feature Highlights

FeatureBenefit
Multiple StorageLocal, S3, FTP
Selective DataChoose what to backup
Tenant ScopeAll or specific tenant
RetentionAutomatic cleanup
Run NowManual execution
DownloadDirect 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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              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

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              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

FieldDescription
Job NameBackup identifier
ScopeAll Tenants or Specific
Run AutomaticallySchedule or manual
Retention LimitMax backups to keep

Data Selection

OptionDescription
CDR RecordsCall history
RecordingsCall recordings
VoicemailsVoicemail messages
FaxesFax files

Storage Configuration

FieldDescription
Storage TypeDestination type
S3 BucketBucket name
RegionAWS region
Access KeyS3 credentials
Secret KeyS3 secret
HostFTP hostname
PortFTP port
UserFTP username
PasswordFTP password
PathDirectory path
---

5. Settings Reference

Storage Types

TypeDescriptionUse Case
LocalServer filesystemQuick access
S3Object storageCloud backup
FTP/SFTPRemote serverOff-site storage

Scope Options

ScopeDescription
All TenantsComplete backup
Specific TenantSingle tenant only

Data Type Impact on Size

Data TypeSize ImpactRecommendation
CDRSmallAlways include
RecordingsLargeExclude if space limited
VoicemailsMediumInclude for user recovery
FaxesMediumInclude if used

Retention Guidelines

EnvironmentRecommendation
Production7-30 days
Development3-7 days
CompliancePer policy (90+ days)
---

6. Common Scenarios & Examples

Scenario 1: Create Daily Backup Job

  1. Click New Backup Job
  2. Name = "Daily Backup"
  3. Scope = All Tenants
  4. Run Automatically = Daily
  5. Retention = 7 backups
  6. Check all data types
  7. Storage = S3, enter credentials
  8. Save

Scenario 2: Run Manual Backup

  1. Find backup job in list
  2. Click Run Now
  3. Wait for completion
  4. Go to Backups tab
  5. Download the new backup

Scenario 3: Restore from Backup

  1. Go to Backups tab
  2. Find desired backup file
  3. Click Restore
  4. Confirm restoration
  5. Wait for completion
  6. Verify restored data

Scenario 4: Tenant-Specific Backup

  1. Create New Backup Job
  2. Scope = Specific Tenant
  3. Select tenant from dropdown
  4. Configure data and storage
  5. Save
  6. 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

  1. Regular Backups: Schedule daily or weekly
  2. Multiple Destinations: Use S3 for redundancy
  3. Test Restores: Periodically verify backups work
  4. Retention Policy: Balance storage vs. history
  5. Off-site Storage: Use S3 or FTP for disaster recovery

Backup vs. Data Type

Data TypeDatabaseFiles
ConfigurationYes-
CDRYes-
Recordings-Yes (large)
VoicemailsYesYes
FaxesYesYes
---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Backup failsStorage fullIncrease storage
S3 errorBad credentialsVerify access key
FTP errorConnection failedCheck host/port
Large backupRecordings includedExclude or archive

Check Backup Status

Bash
# 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

Bash
# 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

TermDefinition
Backup JobConfigured backup task
RetentionNumber of backups to keep
S3Object storage protocol
RestoreRecovery from backup
ScopeBackup coverage
---

Lua Script Status ℹ️

System Module

ComponentStatus
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
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?