The Backup Management Frontend provides a comprehensive web interface for managing database backups, cloud storage integration, and automated backup scheduling.
Main dashboard component with tabbed interface for backups and settings.
Full-featured backup management interface with:
- Backup List: View all database backups with details
- Create Backup: Manual backup creation with optional descriptions
- Restore Database: Point-in-time database restoration
- Cloud Upload: Upload backups to configured cloud storage (rclone)
- Delete Backup: Remove individual backup files
- Cleanup: Automated cleanup of old backups
Configuration interface for:
- Schedule Settings: Configure automated backup intervals
- Retention Policy: Set retention days and maximum backup count
- Cloud Remotes: Configure rclone cloud storage providers
- Enable/Disable: Toggle automated backups
Displays real-time backup statistics:
- Total number of backups
- Retention period (days)
- Backup interval (hours)
- Service status (Active/Disabled)
Create Backup
- Click "Create Backup" button
- Add optional description
- Backup is created and compressed automatically
- Progress indicator shows backup status
View Backups
- Table view with sortable columns
- Pagination for large backup lists
- File size, creation date, and descriptions
- Search and filter capabilities
Restore Database
- Select backup from list
- Review backup details
- Confirm restoration (with warning)
- Database is restored from selected backup
⚠️ WARNING: This overwrites current data!
Delete Backup
- Select backup to delete
- Confirm deletion
- Backup file and metadata removed
Supported Providers (via rclone):
- Amazon S3
- Google Drive
- Dropbox
- Microsoft OneDrive
- Backblaze B2
- Azure Blob Storage
- Google Cloud Storage
- SFTP
- WebDAV
- And 30+ more providers
Upload to Cloud
- Select backup file
- Choose configured cloud remote
- Specify remote path
- Backup is uploaded to cloud storage
- Progress tracking and notifications
Configure Cloud Remote
- Add new remote from settings
- Select cloud provider
- Configure credentials
- Test connection
- Save configuration
Backup Schedule
- Enable/disable automated backups
- Set interval (hours between backups)
- Configure retention period (days)
- Set maximum backup count
Storage Management
- View total backups and storage usage
- Configure backup directory
- Set retention policies
- Cleanup old backups automatically
1. Navigate to Backup Dashboard
2. Click "Create Backup" button
3. Enter description (e.g., "Before v2.0 upgrade")
4. Click "Create Backup"
5. Wait for completion notification
6. Backup appears in list
1. Locate backup in list
2. Click restore icon (circular arrow)
3. Review backup details in dialog
4. Read warning carefully
5. Click "Restore Database"
6. Confirm action
7. Wait for restoration to complete
8. Application may restart
1. Ensure cloud remote is configured (Settings tab)
2. Click cloud upload icon on backup row
3. Select cloud remote from dropdown
4. Enter remote path (e.g., "backups/production/")
5. Click "Upload"
6. Monitor progress
7. Receive completion notification
1. Go to Settings tab
2. Toggle "Enable Automated Backups" ON
3. Set "Backup Interval" (e.g., 12 hours)
4. Set "Retention Period" (e.g., 14 days)
5. Set "Maximum Backups" (e.g., 60)
6. Click "Save Settings"
7. Automated backups will run on schedule
1. Go to Settings tab
2. Scroll to "Cloud Storage Remotes"
3. Click "Add Remote"
4. Enter remote name (e.g., "my-s3-backup")
5. Select provider (e.g., "Amazon S3")
6. Click "Add Remote"
7. Configure credentials via rclone config (see note below)
The frontend integrates with the following backend endpoints:
// List all backups
GET /api/backups
// Create backup
POST /api/backups
Body: { description: "string" }
// Get backup status
GET /api/backups/status
// Restore backup
POST /api/backups/restore
Body: { backup_filename: "string" }
// Delete backup
DELETE /api/backups/{filename}
// Download backup
GET /api/backups/download/{filename}
// Cleanup old backups
POST /api/backups/cleanup// List remotes
GET /api/v1/storage/rclone/remotes
// Configure remote
POST /api/v1/storage/rclone/configure
Body: { remote_name: "string", provider: "string", config: {} }
// Copy to cloud
POST /api/v1/storage/rclone/copy
Body: { source_path: "string", remote_name: "string", remote_path: "string" }
// Delete remote
DELETE /api/v1/storage/rclone/remote/{name}No props required - standalone component
No props required - handles all state internally
<BackupSettings
onSave={(settings) => console.log(settings)}
/>onSave callback receives:
{
retentionDays: number,
maxBackups: number,
intervalHours: number,
autoBackupEnabled: boolean
}Uses Material-UI (MUI) components with:
- Responsive grid layout
- Mobile-friendly design
- Dark/light mode support (via MUI theme)
- Consistent color scheme
- Icon integration
- Primary (Blue): Main actions, active states
- Success (Green): Completed operations, active status
- Warning (Orange): Cleanup operations, caution
- Error (Red): Delete operations, errors
- Info (Light Blue): Information, status indicators
The interface uses Snackbar notifications for:
- ✅ Success messages (green)
- ❌ Error messages (red)
⚠️ Warning messages (orange)- ℹ️ Info messages (blue)
Notifications auto-dismiss after 6 seconds and appear in bottom-right corner.
The interface adapts to different screen sizes:
Desktop (>960px)
- 4-column status cards
- Full table view with all columns
- Side-by-side layouts
Tablet (600-960px)
- 2-column status cards
- Scrollable table
- Stacked layouts
Mobile (<600px)
- Single column layout
- Card view for backups
- Collapsible sections
- Touch-friendly buttons
// In your main App.js or routes file
import BackupDashboard from './components/BackupDashboard';
// Add route
<Route path="/admin/backups" element={<BackupDashboard />} />Required npm packages (should already be installed):
{
"@mui/material": "^5.x",
"@mui/icons-material": "^5.x",
"react": "^18.x",
"date-fns": "^2.x"
}If not installed:
npm install @mui/material @mui/icons-material date-fns// In your navigation menu
import { Backup as BackupIcon } from '@mui/icons-material';
// Add menu item
<MenuItem onClick={() => navigate('/admin/backups')}>
<ListItemIcon>
<BackupIcon />
</ListItemIcon>
<ListItemText primary="Backups" />
</MenuItem>The backup endpoints should be protected with authentication. Ensure:
- User is logged in
- User has admin privileges
- API tokens are valid
- CSRF protection is enabled
Backup operations should only be accessible to:
- System administrators
- Users with backup management role
- Super admin accounts
Consider implementing rate limiting for:
- Backup creation (prevent abuse)
- Restoration operations
- Cloud uploads
Issue: Backup list is empty or shows loading spinner
Solutions:
- Check backend is running
- Verify API endpoint
/api/backupsis accessible - Check browser console for errors
- Ensure backup directory exists
- Check file permissions
Issue: Cloud upload shows error
Solutions:
- Verify rclone is installed
- Check remote configuration
- Test rclone connectivity manually
- Verify credentials are correct
- Check remote path exists
Issue: Database restore shows error
Solutions:
- Ensure database is accessible
- Check PostgreSQL is running
- Verify backup file is not corrupted
- Ensure sufficient disk space
- Check database user permissions
Issue: Settings changes don't persist
Solutions:
- Implement backend settings endpoint
- Save to environment variables
- Update docker-compose.yml
- Restart services after changes
You can configure automatic cloud uploads by:
- Setting up rclone remote
- Creating a scheduled task to upload backups
- Using the API to trigger uploads after backup creation
Track backup operations by:
- Checking status dashboard regularly
- Setting up alerts for failed backups
- Monitoring storage usage
- Reviewing backup logs
Trigger backups before deployments:
# In your deployment script
curl -X POST http://ops-center:3001/api/backups \
-H "Content-Type: application/json" \
-d '{"description": "Pre-deployment backup"}'Potential features for future versions:
- Backup Verification: Test restore in sandbox
- Encryption: Encrypt backups at rest
- Incremental Backups: WAL-based incremental backups
- Email Notifications: Alert on backup success/failure
- Backup Comparison: Compare backups to find differences
- Point-in-Time Recovery: More granular restore options
- Multi-Database: Support for multiple databases
- Backup Metrics: Grafana/Prometheus integration
- Backup Scheduling: Cron-like scheduling interface
- Backup Policies: Different policies for different databases
For issues or questions:
- Check backend logs:
docker logs ops-center | grep -i backup - Review API documentation:
DATABASE_BACKUP_GUIDE.md - Test CLI:
./backup-database.sh list - Check rclone config:
rclone config
(Add screenshots of your implementation here)
Same as Ops-Center OSS project