Website File Backup: Setup for Data Loss Prevention

Website File Backup: Setup for Data Loss Prevention

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1285
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1241
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1033
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1104
  • image_website-_0.webp
    Website development for Red Pear
    554

Website File Backup: Setup for Data Loss Prevention

Accidental deletion of the uploads folder, a server disk failure, or an attack — without a file copy, your site becomes an empty shell. Code from git restores in minutes, but user-uploaded images, PDFs, and configs are gone. We are a team with 10+ years of experience in backup configuration. We offer turnkey setup: rsync over SFTP or S3 sync, rotation, notifications, and test restoration. We'll assess your project for free in one day. File backup is not about saving — it's about restoring. Without regular verification of copies, you risk losing data at a critical moment. Adhering to the 3-2-1 backup rule (Wikipedia) ensures data redundancy. We guarantee that after our setup, you'll be able to restore files in minutes.

Which files should be backed up and how?

Must back up: user-uploaded files (uploads/), SSL certificates (if not Let's Encrypt), custom configurations outside the repository. No need to back up: code from git, node_modules, vendor, application cache, temporary files. Git already stores history — duplicating it in the backup is pointless. Exclude large temporary folders to save space and traffic. Incremental backup copies only changed files each time, speeding up the process and reducing server load.

We use two main scenarios. The choice depends on budget and recovery speed requirements.

How to set up incremental backup using rsync

View rsync backup script
#!/bin/bash # /usr/local/bin/files-backup.sh set -euo pipefail SOURCE="/var/www/myapp/storage/app/uploads" BACKUP_HOST="backup.example.com" BACKUP_USER="backup" BACKUP_PATH="/backups/myapp/files" TIMESTAMP=$(date +%Y-%m-%d) rsync -avz \ --link-dest="${BACKUP_PATH}/latest" \ --exclude="*.tmp" \ --exclude=".DS_Store" \ -e "ssh -i /root/.ssh/backup_key -o StrictHostKeyChecking=no" \ "${SOURCE}/" \ "${BACKUP_USER}@${BACKUP_HOST}:${BACKUP_PATH}/${TIMESTAMP}/" ssh -i /root/.ssh/backup_key "${BACKUP_USER}@${BACKUP_HOST}" \ "ln -sfn '${BACKUP_PATH}/${TIMESTAMP}' '${BACKUP_PATH}/latest'" echo "[$(date)] Files backup completed: ${TIMESTAMP}" 

AWS S3 sync

View S3 sync script
aws s3 sync /var/www/myapp/storage/app/uploads/ \ s3://myapp-backups/files/uploads/ \ --delete \ --exclude "*.tmp" \ --storage-class STANDARD_IA aws s3api put-bucket-lifecycle-configuration \ --bucket myapp-backups \ --lifecycle-configuration file://lifecycle.json 
{ "Rules": [{ "ID": "delete-old-backups", "Filter": { "Prefix": "files/" }, "Status": "Enabled", "Expiration": { "Days": 90 } }] } 

Comparison of rsync and S3 sync

View comparison table
Criteria rsync + SSH AWS S3 sync
First backup speed ~5 min for 10 GB ~10 min for 10 GB
Storage cost per month for 10 GB, 90 days ~$1.2 (server rental) ~$0.13 (S3 STANDARD_IA)
Setup complexity Medium Low
Restoration Copy back via SSH aws s3 cp recursively

S3 sync is better for cloud projects; rsync is ideal for full control. For initial backup, rsync is 2 times faster than S3. For storage cost, S3 is nearly 10 times cheaper than renting a server. Our solutions can reduce storage costs by up to 50% compared to an additional server.

How to choose between rsync and S3 and automate rotation?

If your server is already in AWS, S3 is natural due to integration and low cost for STANDARD_IA. With a dedicated server, rsync to a second server or SFTP storage is simpler and cheaper. We help you decide during the audit phase. Estimate data volume and change frequency upfront to avoid overpaying for storage.

Rotation prevents old copies from filling up space. For S3, configure a Lifecycle policy: keep daily copies for 30 days, weekly for 90 days, monthly for 12 months. For rsync, use scripts with find and rm or logrotate. We always configure rotation so that multiple recovery points are available.

What's included in our turnkey backup setup

Included services:

  • Backup script development (bash/ansible)
  • Crontab configuration with priority after database backup
  • Notifications to Telegram/Slack (success/error)
  • Rotation setup: S3 Lifecycle or rsync --delete-excluded
  • Test restoration on staging
  • Documentation: schema, contacts, restoration instructions
  • Training and support for your team

Work process and timeline

  1. Analysis: determine directories to back up, choose storage (S3, SFTP, second server).
  2. Design: write script, configure access rights and SSH keys.
  3. Implementation: deploy solution on production, set up monitoring.
  4. Testing: restore files in a test environment, verify integrity.
  5. Deployment: finalize crontab, hand over documentation, train the team.

Configuring one scenario takes 0.5 to 1 day. The exact price depends on data volume and complexity. Our configuration service starts at $500 for a single backup scenario, including script development, rotation, and test restoration. Contact us — we'll assess your project in one day.

Common mistakes and the importance of test restoration

Common mistakes:

  • Ignoring test restoration — a backup that cannot be restored is useless.
  • Storing backups on the same disk as the site (RAID does not protect against accidental rm).
  • Lack of notifications — a failure can go unnoticed for weeks.

Guarantee: all configured backups pass a test restoration before being handed over to the client. Without a test restoration, you don't know if the backup works. We always restore files to a staging environment and check integrity via md5sum or file count comparison. Rsync recommends using the --dry-run option for verification.

Recommended backup rotation

Type Frequency Retention
Daily Every day 30 days
Weekly Every week 90 days
Monthly Every month 12 months