Configuring Backup for Bitrix24 On-Premise

Configuring Backup for Bitrix24 On-Premise A disk dies unexpectedly. Or someone accidentally runs `rm -rf` in `/home/bitrix/www`. Recovering 10,000 client records without a backup is a myth. In On-Premise administration practice, it is a regular, tested data copy that separates companies sleeping

Our competencies:

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1415
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    995
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    733
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    862
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    772
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1134

Configuring Backup for Bitrix24 On-Premise

A disk dies unexpectedly. Or someone accidentally runs rm -rf in /home/bitrix/www. Recovering 10,000 client records without a backup is a myth. In On-Premise administration practice, it is a regular, tested data copy that separates companies sleeping soundly from those scrambling to find money to buy data from recovery specialists. The average loss from a 100 GB database failure is estimated at 500,000 rubles — that's the cost of downtime and re-entering data. Configuring backup for Bitrix24 On-Premise is not a one-time task but a process. We'll break down which components to copy, how, and — most importantly — how to ensure the backup actually works. Over 10 years of administering hundreds of installations, we've derived a simple formula: RPO no more than 1 hour, RTO no more than 4 hours. And this is achievable without expensive boxed solutions. Moreover, a well-designed backup scheme reduces recovery time to 2 hours in 90% of cases, and the cost of professional setup pays for itself after the first successful restore. For example, for an installation with a 50 GB database and 200 GB of files, the full backup cycle takes less than 30 minutes.

What Needs to Be Backed Up

Bitrix24 On-Premise consists of several components, each requiring a separate strategy. Here is the minimum set:

Component Location Tools Frequency
Database (MySQL/MariaDB) /var/lib/mysql/bitrix Percona XtraBackup, mysqldump Incremental every hour, full once daily
Core files /home/bitrix/www rsync, tar Once daily
Uploaded files /home/bitrix/www/upload rsync Every 4 hours
Bitrix24 disk /home/bitrix/www/bitrix/managed_cache rsync Once daily (if cache is important)
nginx, PHP configuration /etc/nginx, /etc/php.ini git, rsync After every change

Why Percona XtraBackup Is Better Than mysqldump

mysqldump creates a logical dump — it locks tables for writing and requires a full dump each time. For a 50 GB database, the dump time can exceed an hour, and recovery takes even longer. Percona XtraBackup takes a physical copy of InnoDB tables on the fly, without locking, and supports incremental backups. Result: full backup of a 50 GB database — 15 minutes, incremental — 3–5 minutes. This keeps RPO within an hour even on high-load projects.

Built-in Backup: When Is It Suitable?

The "Backup" module in Bitrix24 is convenient for small sites (up to 1 GB of data) or as a quick means for transfer to a test environment. But for production it is dangerous: the archive is written to the same disk, no rotation, no incremental support. As stated in the official 1C-Bitrix documentation (https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=2724&LESSON_PATH=3913.3516.2724), "this method is not recommended for regular use on large projects." Use it as a supplement to the main backup.

How to Set Up Professional Backup via cron

Database with Percona XtraBackup — the standard for production:

#!/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 

Don't forget to set environment variables: DB_PASS — the password for the bitrix user, and latest_full — a symlink to the latest full backup.

Script for 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 Storage: Comparison of Options

A backup on the same server is not a backup. If the server dies, you lose everything. Compare popular external storage options:

Option Recovery Speed Cost Reliability
S3 storage (Yandex Object Storage, AWS S3) Medium (depends on channel) Low (pay per GB) High (10+ nines)
Offsite server via rsync/SSH High (local network) Medium (server rental) High (geographical distribution)
NAS + replication to cloud High (NAS), Medium (cloud) Medium (NAS cost) Medium (NAS can fail)

The cost of storing 1 TB in S3 is about 1,000 rubles per month. For production, we recommend a hybrid: local rsync backup to NAS followed by replication to an S3 storage in a different region. This gives both recovery speed and geographic protection.

How Often to Test Recovery?

A backup that has never been tested is an illusion of security. At least once a quarter, perform drills:

  1. Deploy a test server with the same OS and Bitrix24 version.
  2. Restore the latest full database backup: xtrabackup --prepare && xtrabackup --copy-back.
  3. Restore files from the rsync copy to the test server.
  4. Verify functionality: login, CRM access, lead creation, recent records.
  5. Record recovery time (RTO). For most On-Premise installations, the target RTO is no more than 4 hours.

Our experience: the first check often reveals errors in scripts or version incompatibilities. After two or three drills, the process becomes routine.

What’s Included in Turnkey Backup Configuration

If you want to guarantee data safety, order professional setup. The work includes:

  • Audit of current configuration: checking disk subsystem, communication channels, access rights.
  • Installation and configuration of Percona XtraBackup with incremental backup (RPO 1 hour).
  • rsync scripts for files with rotation and deletion of old copies.
  • Configuration of external storage (S3 or offsite) with channel encryption.
  • Documentation of the recovery procedure and training for your administrator.
  • One-time test recovery with RTO measurement.
  • Guarantee: if the regulations are followed, we restore data within the agreed time.

Get a consultation — we'll assess your server and propose an optimal backup scheme within one day. Contact our engineers to protect your data.