System Backups in rConfig V8 Core
After reading this page, you can run an on-demand system backup, schedule recurring backups, manage retained backup files, and understand how a restore works in rConfig V8 Core. System backups capture the whole application (settings, database, and storage) in one compressed archive, distinct from per-device configuration backups.
When to use this
Section titled “When to use this”Use system backups to protect a full rConfig V8 Core deployment so you can recover the application after a host failure, data corruption, or a migration to new infrastructure. For per-device config history and version comparison, use configuration backups instead. This page covers the application-level backup that bundles your settings, database, and storage together.
Prerequisites
Section titled “Prerequisites”- A logged-in rConfig V8 Core account with access to the Backups page.
- The Horizon queue manager running, since backup jobs are queued for processing.
- Sufficient free disk space at the backup destination, typically 2-3x the size of your storage repository plus the database.
- Write access for the rConfig application to the backup destination (default:
/var/www/html/rconfig/storage/app/backups). - PostgreSQL users only: the
pg_dumputility installed on the host. MySQL users do not need extra tools, asmysqldumpships with standard MySQL installs.
What gets backed up
Section titled “What gets backed up”Each system backup captures three components in a single compressed archive:
- Storage directory: all application data under
/var/www/html/rconfig/storage/, including downloaded device configurations. - Database dump: a complete export of the rConfig database (MySQL or PostgreSQL).
.envfile: the environment configuration holding application settings and database connection details.
A single archive therefore contains everything needed to restore a complete rConfig instance, with no need to coordinate separate backup sources during recovery.
How system backups work
Section titled “How system backups work”When a backup starts, manually or from a scheduled task, rConfig:
- Queues the backup job through the Horizon queue manager.
- Creates the database dump using native tools (
mysqldumporpg_dump). - Archives the rConfig application directory.
- Includes all downloaded device configurations from the storage repository.
- Generates a timestamped ZIP file containing every component.
- Stores the backup locally or transfers it to the configured FTP destination.
The queue-based design keeps backup work from interfering with device polling or configuration downloads.
Backup storage capacity metrics
Section titled “Backup storage capacity metrics”The Backups page shows capacity metrics at the top of the interface (also visible on the dashboard):
- Total number of backup files stored.
- Total combined size of those backups.
- Total free disk space at the destination.
- Backup destination (Local Disk or FTP server).
Monitor these regularly to avoid backup failures from insufficient storage. Backup size grows with device count, configuration file sizes and retention, database growth, and your retention policy.
Running a manual backup
Section titled “Running a manual backup”To create an on-demand backup:
- Navigate to Backups in the main navigation menu.
- Review the capacity metrics at the top of the page.
- Click Start Backup.
- rConfig queues the backup job and returns control immediately.
- Refresh the page after 1-5 minutes (depending on data volume) to see the new file in the list.
The backup filename follows the pattern rconfig_backup_YYYY-MM-DD_HH-MM-SS.zip.
What affects backup processing time
Section titled “What affects backup processing time”Backup duration depends on:
- Queue depth: the number of pending jobs in the Horizon queue manager.
- Storage repository size: total volume of downloaded device configurations.
- Database size: device, task, and historical record counts.
- System resources: available CPU, memory, and disk I/O.
For deployments with 1,000+ devices or 100GB+ storage repositories, schedule backups during maintenance windows to avoid contention with polling.
Scheduling automated backups
Section titled “Scheduling automated backups”Regular automated backups are essential for production environments. To configure one:
- From the Backups page, click Scheduled Task.
- rConfig opens the Scheduled Tasks configuration page.
- Create a new scheduled task with these parameters:
- Task Type: select System Backup.
- Schedule: set the frequency (daily, weekly, or a custom cron expression).
- Time: choose a maintenance window with minimal activity.
- Enabled: confirm the task is active.
Recommended backup schedules
Section titled “Recommended backup schedules”Choose a strategy based on your environment:
| Environment | Suggested schedule | Retention |
|---|---|---|
| Production, frequent changes | Daily, off-peak (for example 02:00 local) | 7 daily, plus 4 weekly |
| Stable, infrequent changes | Weekly, in a maintenance window | 4-6 weekly, monthly archived |
| Mission-critical | Twice daily, around change windows | Pair with VM snapshots, test restores regularly |
Managing backup files
Section titled “Managing backup files”Downloading a backup
Section titled “Downloading a backup”To download a backup for offsite storage or migration:
- Navigate to the Backups page.
- Locate the backup in the file list.
- Click the backup filename.
- The ZIP archive downloads to your local system.
Store downloaded backups in a secure location separate from your rConfig server to protect against site-wide failures.
Deleting a backup
Section titled “Deleting a backup”To remove a specific backup file:
- Navigate to the Backups page.
- Locate the backup file to delete.
- Click the delete icon next to the filename.
- Confirm the deletion when prompted.
Delete obsolete backups to reclaim disk space, while keeping enough retention for your recovery requirements.
Configuring the backup cleanup strategy
Section titled “Configuring the backup cleanup strategy”The backup cleanup strategy automates retention based on configured policies:
- Navigate to System Settings > Backups Settings.
- Change the Backup Strategy Settings as required.
A typical retention policy keeps daily backups for 7 days, weekly backups for 4 weeks, and monthly backups for 6-12 months.
Restoring from a backup
Section titled “Restoring from a backup”The general restore process helps you plan for recovery:
- Provide the backup ZIP file to rConfig support.
- Support extracts the application files, database dump, and configurations.
- Import the database dump to a clean database instance.
- Deploy extracted application files to
/var/www/html/rconfig. - Copy configuration files to the storage repository location.
- Confirm application functionality, database connectivity, and configuration access.
- Re-enable scheduled tasks and resume normal operations.
Planning restore time
Section titled “Planning restore time”Recovery time objectives (RTO) vary with backup file size, database restore time (large databases of 50GB+ take longer to import), the depth of verification checks, and support availability. For stringent RTO targets, consider VM-level snapshots for rapid infrastructure recovery and pre-staged backup files in multiple locations.
Common gotchas
Section titled “Common gotchas”Troubleshooting
Section titled “Troubleshooting”Why does my backup job never complete?
Section titled “Why does my backup job never complete?”Check queue manager status and backup job progress:
# Check Horizon queue statusphp /var/www/html/rconfig/artisan horizon:status
# Check for failed jobsphp /var/www/html/rconfig/artisan queue:failedCommon causes: Horizon not running, insufficient disk space, a database connection timeout during the dump, or file permission issues. Resolve them by:
- Verifying Horizon is running:
Terminal window sudo systemctl status rconfig-horizon - Restarting it if stopped:
Terminal window sudo systemctl restart rconfig-horizon - Checking disk space:
Terminal window df -h /var/www/html/rconfig/storage/app/backups - Verifying write permissions:
Terminal window ls -la /var/www/html/rconfig/storage/app/backupssudo chown -R www-data:www-data /var/www/html/rconfig/storage/app/backups - Reviewing Laravel logs for specific errors:
Terminal window tail -f /var/www/html/rconfig/storage/logs/laravel.log
Why does my PostgreSQL backup fail with “pg_dump: command not found”?
Section titled “Why does my PostgreSQL backup fail with “pg_dump: command not found”?”The PostgreSQL client utilities are not installed or not on the PATH.
- Install PostgreSQL client utilities (Ubuntu/Debian):
Terminal window sudo apt-get updatesudo apt-get install postgresql-client-16 - Install PostgreSQL client utilities (RHEL/CentOS):
Terminal window sudo yum install postgresql16 - Verify the installation:
Terminal window which pg_dumppg_dump --version - Retry the backup after confirming
pg_dumpis available.
Why is my backup file much larger than expected?
Section titled “Why is my backup file much larger than expected?”The storage repository, database, or cache may be holding more than expected.
- Examine the backup contents:
Terminal window unzip -l rconfig_backup_YYYY-MM-DD_HH-MM-SS.zip | sort -k4 -n -r | head -20 - Review configuration retention policies and purge obsolete versions.
- Archive or truncate historical data that is no longer required.
- Clear the application cache before creating backups:
Terminal window php /var/www/html/rconfig/artisan cache:clear
Why does my FTP backup transfer fail?
Section titled “Why does my FTP backup transfer fail?”Check FTP configuration and network connectivity.
- Verify FTP settings in the rConfig configuration.
- Test FTP connectivity manually:
Terminal window ftp ftp.yourserver.com# Enter credentials and attempt a file transfer - Check firewall rules for FTP ports (21 for control, 20 or the passive range for data).
- Verify the FTP server has adequate free space.
- Review Laravel logs for specific FTP error messages.
- Switch FTP mode (active/passive) if there is a mismatch.
Best practices
Section titled “Best practices”Security
Section titled “Security”- Encrypt backups before transferring offsite, since archives contain credentials and topology. Use
gpg --symmetric --cipher-algo AES256 rconfig_backup_YYYY-MM-DD_HH-MM-SS.zip. - Restrict the backup directory to the rConfig user only:
sudo chmod 700 /var/www/html/rconfig/storage/app/backups. - Prefer SFTP or SCP over FTP for encrypted offsite transfer.
- Monitor access to backup files through system logs to detect unauthorized retrieval.
Performance
Section titled “Performance”- Schedule backups during maintenance windows so compression and disk I/O do not impact polling or user operations.
- Implement retention policies that balance recovery needs with storage efficiency, for example 7 daily, 4 weekly, and 6 monthly backups.
- Alert when backup storage reaches 80% capacity to prevent failures from insufficient space.
Maintenance
Section titled “Maintenance”- Review backup logs weekly to catch warnings about skipped files or partial transfers.
- Periodically download and extract a backup to validate archive integrity before you ever need it.
- Re-evaluate backup schedules, retention, and storage capacity as your device inventory grows.
- Archive monthly backups offsite for compliance or disaster recovery requirements.
Quick reference
Section titled “Quick reference”Backup component checklist
Section titled “Backup component checklist”| Component | Location | Included |
|---|---|---|
.env file | /var/www/html/rconfig/.env | Yes |
| Storage repository | /var/www/html/rconfig/storage | Yes |
| Database dump | MySQL or PostgreSQL database | Yes |
Common backup commands
Section titled “Common backup commands”# Manually trigger a backup (runs the backup job immediately)php /var/www/html/rconfig/artisan backup:run
# Check Horizon status (backup job processor)php /var/www/html/rconfig/artisan horizon:status
# View failed backup jobsphp /var/www/html/rconfig/artisan queue:failed
# Check backup directory disk spacedf -h /var/www/html/rconfig/storage/app/backups
# List backup files with sizesls -lh /var/www/html/rconfig/storage/app/backups
# Verify PostgreSQL client toolswhich pg_dumppg_dump --version