Home » Ecommerce Security » Backup Strategy

Backup Strategy for Your Online Store: Protect Against Data Loss

A proper ecommerce backup strategy follows the 3-2-1 rule: maintain 3 copies of your data, stored on 2 different types of media, with 1 copy offsite. Automate daily backups of both your files and database, keep 30 days of daily backups plus monthly archives for a year, and test your restoration process monthly. This strategy protects against ransomware, server failure, accidental deletion, malware, and bad updates, giving you the ability to restore your store to a working state within hours of any catastrophic event.

Before You Start

The most important lesson in backup strategy is that a backup you have never tested is not a backup. It is an assumption that may fail when you need it most. Hosting providers have experienced backup system failures where months of backups were silently corrupted. Backup plugins have had bugs where database exports were incomplete. Store owners have discovered during a crisis that their backup did not include critical configuration files or product images. Testing your restoration process turns your backup from a hope into a verified capability.

The cost of not having backups is catastrophic. Ransomware encrypts your files and demands payment for decryption. Server hardware failure destroys your data with no recovery option. A bad plugin update corrupts your database and takes your store offline. An employee accidentally deletes the product catalog. Malware modifies your checkout to steal customer credit cards for weeks before detection. In each scenario, backups are the difference between a few hours of recovery work and losing your entire business.

Step-by-Step Backup Setup

Step 1: Identify everything that needs to be backed up.
Your store's data falls into several categories that all need to be included in your backup. Database: Contains your products, categories, orders, customer accounts, settings, and content. This is the most critical component because it represents all your business data. Application files: Your ecommerce platform core files, plugins, themes, and configuration files. Media files: Product images, uploaded documents, downloadable digital products, and other media stored on your server. Configuration: Server configuration files (Apache/Nginx config, PHP settings, SSL certificates), cron jobs, and environment variables. Email: If you host email on the same server, email accounts and stored messages. For hosted platforms like Shopify, your product data, customer data, orders, and theme customizations all live on Shopify's infrastructure. Shopify maintains their own backups, but you should also export your own copies because Shopify's backups are for their disaster recovery, not yours. Use the Shopify admin's export functions or a third-party backup app to maintain your own copies.
Step 2: Implement the 3-2-1 backup rule.
Copy 1: Your live production data on your web server. This is not a "backup" in the traditional sense, but it counts as one of your three copies. Copy 2: An automated backup stored on a different storage system from your server. For self-hosted stores, this might be a backup stored in your hosting provider's backup storage (many providers offer separate backup storage that is isolated from your web server). Copy 3: An offsite backup stored with a completely different provider in a different physical location. If your server is at DigitalOcean, store your offsite backup in Amazon S3, Google Cloud Storage, Backblaze B2, or Wasabi. If your server is at AWS, store offsite backups with a non-AWS provider. The point of geographic and provider separation is that a single catastrophic event, whether a data center fire, a provider billing dispute, or a widespread infrastructure failure, cannot destroy all your copies simultaneously. Cloud storage for ecommerce backups typically costs $1 to $10 per month depending on your store size.
Step 3: Set up automated daily backups.
Manual backups are unreliable because they depend on you remembering to run them, and the one day you forget is inevitably the day before a disaster. Automate your backups to run daily without any human intervention. For WooCommerce: UpdraftPlus (free) is the most popular WordPress backup plugin. Configure it to run daily backups of both files and database, and set it to send backups to a remote storage destination (Google Drive, Dropbox, Amazon S3, or Backblaze B2). The free version handles one scheduled backup; the premium version ($70/year) adds incremental backups that only transfer changed files, reducing backup time and storage usage for large stores. BlogVault ($89/year) takes a different approach by running backups from their servers rather than your server, eliminating the performance impact of backup processing. For Shopify: Rewind Backups ($39/month) is the most comprehensive Shopify backup solution, backing up products, collections, orders, customers, pages, blog posts, theme files, and store settings. BackupMaster ($3.99/month) covers core data at a lower price point. For Magento: Use the built-in backup functionality in the Magento admin (System, Backups) combined with a server-level file backup via cron job, or use a Magento-specific backup extension. For server-level backups: If you manage your own VPS or dedicated server, set up a cron job that runs mysqldump for database backups and rsync or tar for file backups, then transfers the backup files to your offsite storage using rclone or s3cmd. Schedule database backups to run during your lowest-traffic hours to minimize performance impact.
Step 4: Configure backup retention and rotation.
Keeping every daily backup forever is expensive and unnecessary. A practical retention schedule for ecommerce stores balances recovery flexibility against storage costs. Keep daily backups for 30 days, which covers the discovery window for most malware infections and data corruption issues. Keep one weekly backup (typically Sunday) for an additional 3 months, which provides recovery points for issues discovered after the daily window. Keep one monthly backup (first of the month) for 1 year, which provides long-term recovery capability for issues like gradual data corruption or compliance requirements. Delete backups older than these retention periods automatically. Most backup tools and plugins support retention policies that handle deletion automatically. For the offsite backup location, apply the same retention schedule. Storage costs for this retention policy are typically $2 to $20 per month for small to mid-size stores, depending on the size of your database and media files.
Step 5: Test your backups with a monthly restoration drill.
Set a monthly calendar reminder to test your backup restoration process. The test should verify: Can you locate and download a recent backup? Can you restore the database to a test environment (a staging site, a local development server, or a temporary VPS)? Does the restored site function correctly, with products, images, orders, and customer accounts intact? How long does the full restoration process take? Are there any errors or missing components? Document the results and the time required. If the restoration takes 4 hours, you now know your maximum downtime in a disaster. If you find missing data or errors, fix the backup configuration before the next cycle. The most common issues discovered during testing include: database backups that were incomplete because the export timed out on large tables, media files that were excluded from the backup to save space but are needed for the site to function, configuration files (wp-config.php, .htaccess, server configs) that were not included, and backup files that were corrupted during transfer and cannot be extracted. Every issue you discover during a routine test is an issue that would have caused a failed restoration during an actual emergency.

Backup Strategy for Specific Scenarios

Before major updates: Always create a manual backup immediately before updating your ecommerce platform, major plugins, or themes. Automated daily backups may be up to 24 hours old, and a lot of orders can come in during that window. Most backup plugins offer a one-click manual backup option. For WooCommerce, UpdraftPlus has a "Backup Now" button in the dashboard. For Shopify, trigger a manual export of products and customers before installing a major app or changing themes. This pre-update backup is your instant rollback point if the update causes problems.

Before and during sales events: High-traffic events like Black Friday, flash sales, and product launches generate order volume that makes data loss particularly costly. Create a manual backup before the event starts. Consider increasing backup frequency to every 6 hours during the event period (most backup plugins support custom scheduling). After the event, verify that your automated backup captured all orders and customer data by comparing the backup's order count against your live dashboard.

Ransomware recovery: If ransomware encrypts your store, your backups are your primary recovery tool. Do not pay the ransom, only 8% of paying victims recover all their data, and payment funds criminal operations. Identify the date of infection by checking your security logs and file modification timestamps. Restore from the most recent clean backup (before the infection date). After restoration, immediately close the vulnerability that allowed the ransomware infection, change all passwords, and verify that the restored site is free of malware. If the infection predates all your backups, engage a professional incident response firm, as attempting to manually decrypt or clean a ransomware infection without expertise usually makes the situation worse.

Backup Security

Your backups contain everything an attacker wants: customer names, addresses, email addresses, order history, and potentially hashed passwords. If your backup files are not encrypted and are stored in an accessible location, they represent a significant data breach risk. Encrypt your backup files before storing them offsite using AES-256 encryption. Most backup plugins support encryption during the backup process. If yours does not, use a tool like GPG to encrypt backup files before uploading them to cloud storage.

Restrict access to backup storage locations. The cloud storage bucket or folder where your backups are stored should have access limited to only the backup automation account and your admin account. Do not use shared credentials, public buckets, or broadly accessible storage locations. Enable access logging on your backup storage so you can see who accessed the backups and when. If you are subject to GDPR or other data protection regulations, your backup storage must meet the same security and geographic requirements as your live customer data storage.