Configuring Backups for Bitrix24 On-Premise
Backup is the only thing standing between you and disaster when a disk dies or someone accidentally deletes 10,000 client records. In On-Premise administration, "we have a backup" is what separates serious operations from those that either pay to recover data or cannot recover it at all.
What to Back Up
Bitrix24 On-Premise consists of several components, each requiring its own strategy:
| Component | Location | Method | Frequency |
|---|---|---|---|
| Database | MySQL/MariaDB | mysqldump / Percona XtraBackup | Hourly (incremental) / daily (full) |
| Site files | /home/bitrix/www |
rsync / tar | Daily |
| Uploaded files | /home/bitrix/www/upload |
rsync | Every 4 hours |
| Configuration | nginx, php.ini, .env | git or rsync | On change |
| Bitrix24 Disk | /home/bitrix/www/bitrix/managed_cache + upload |
rsync | Daily |
Configuring the Built-In Backup
Bitrix24 has a built-in backup module: Settings → Backup. It creates file archives and a database dump, but has critical limitations:
- Slower than professional tools (mysqldump through PHP)
- Creates the archive on the same disk — if the disk fails, it is lost along with the data
- No incremental backup — every run is a full backup
For production, treat the built-in backup as a supplement, not the primary backup mechanism.
Professional Configuration via Cron
Database with Percona XtraBackup (for databases >10 GB):
#!/bin/bash
# /usr/local/bin/bitrix-backup-db.sh
BACKUP_DIR="/backup/bitrix/db"
DATE=$(date +%Y%m%d_%H%M)
# Full backup every Sunday
if [ $(date +%u) -eq 7 ]; then
xtrabackup --backup --target-dir=$BACKUP_DIR/full_$DATE \
--user=bitrix --password=$DB_PASS
else
# Incremental backup on other days
xtrabackup --backup --target-dir=$BACKUP_DIR/inc_$DATE \
--incremental-basedir=$BACKUP_DIR/latest_full \
--user=bitrix --password=$DB_PASS
fi
Files via rsync with rotation:
#!/bin/bash
# Daily file backup with 30-day retention
rsync -avz --delete \
/home/bitrix/www/upload/ \
backup-server:/backups/bitrix-upload/$(date +%Y%m%d)/
# Delete backups older than 30 days
find /backups/bitrix-upload/ -maxdepth 1 -type d -mtime +30 -exec rm -rf {} \;
External Backup Storage
A backup on the same server is not a backup. Configure replication to external storage:
Option 1: S3-compatible storage (AWS S3, Wasabi, Backblaze B2):
aws s3 sync /backup/bitrix/ s3://your-bucket/bitrix-backups/ \
--endpoint-url https://s3.amazonaws.com
Option 2: Offsite server via rsync/SSH: configure SSH keys and automated cron synchronization to a backup server in a different data center.
Option 3: NAS on the local network as intermediate storage + replication to the cloud.
Testing Recovery
A backup that has never been tested for recovery is an illusion of security. Perform recovery drills at minimum once per quarter:
- Provision a test server
- Restore the latest database backup:
xtrabackup --prepare && xtrabackup --copy-back - Restore files
- Verify functionality: login, open CRM, check recent records
- Record the recovery time (RTO) — for most clients, 2–4 hours is acceptable
Target metrics for Bitrix24 On-Premise:
- RPO (acceptable data loss): no more than 1 hour → hourly incremental database backups
- RTO (recovery time): no more than 4 hours → documented procedure, tested in advance
If the backup has not been tested — it does not work. This is an axiom.







