PrestaShop Module

Complete backup module for PrestaShop. Backup your database, product images, uploaded files, modules, and themes.

v1.3.0Updated 2026-01-01

Requirements

  • PrestaShop 1.7.0 or higher
  • PHP 7.4 or higher
  • cURL extension enabled
  • LOX API key

Installation

  1. Download the module

    Click the download button above to get the zip file.

  2. Upload to PrestaShop

    Go to Modules → Module Manager → Upload a module

  3. Configure the module

    Click "Configure" and enter your LOX API key.

  4. Set up backup schedule

    Select which components to backup and set your preferred schedule.

Configuration

LOX Backup PrestaShop Settings

LOX Backup module configuration in PrestaShop admin

Backup Components

ComponentDescriptionDefault
DatabaseAll PrestaShop tablesEnabled
FilesUpload and download directoriesEnabled
ImagesProduct and category imagesEnabled
ModulesAll installed modulesDisabled
ThemesAll installed themesDisabled

Component-Based Backup Schedules

Configure different backup schedules for each component type:

ComponentDefault ScheduleDescription
CatalogWeeklyProducts, categories, attributes
TransactionalDailyOrders, customers, carts
FilesWeeklyUploads, downloads, images
ConfigDailySettings, carriers, zones

Store Data Export

The module automatically exports important store configuration as JSON:

  • Store configuration (name, email, address, currency)
  • Categories structure
  • Carriers and shipping settings
  • Zones and zone configurations
  • Tax rules and groups
  • Order states
  • Payment module settings

Scheduled Backups

The module uses PrestaShop's cron system. You need to set up a cron job that calls:

# Add to your server's crontab
*/15 * * * * curl -s "https://your-store.com/modules/loxbackup/cron.php?token=YOUR_TOKEN"

Alternatively, you can use PrestaShop's built-in cron tasks module if installed.

Manual Backup

Click the "Backup Now" button in the module configuration to run a backup immediately. Large stores may take several minutes - the page will show a loading indicator until complete.

Restoring a Backup

To restore from a backup:

  1. Navigate to backup history

    Go to the Backups tab in the LOX Backup module.

  2. Click Restore

    Click the "Restore" button next to any completed backup.

  3. Confirm the restoration

    A confirmation dialog will appear. Type RESTORE to confirm. This safety measure prevents accidental data loss.

  4. Wait for completion

    The restoration will begin and you'll be notified when complete.

Warning: Restore overwrites data

Restoring a backup will replace your current store data with the backup contents. This action cannot be undone. Always create a fresh backup before restoring.

Backup Structure

Each backup creates a tar.gz archive with this structure:

prestashop-mystore-20240115_030000.tar.gz
├── database.sql           # Full database dump
├── upload/                # Uploaded files
├── download/              # Downloadable products
├── img/                   # Product images (if enabled)
├── modules/               # Modules (if enabled)
├── themes/                # Themes (if enabled)
└── store_data/
    ├── configuration.json
    ├── categories.json
    ├── carriers.json
    ├── zones.json
    ├── tax_rules.json
    ├── order_states.json
    └── payment_modules.json

PULL Mode (New in v1.3.0)

New Feature: Server-Initiated Backups

PULL mode allows LOX to initiate backups remotely, providing centralized scheduling, better reliability, and active monitoring of your PrestaShop stores.

Enabling PULL Mode

  1. Go to module configuration

    Navigate to Modules → LOX Backup → Configure → PULL tab.

  2. Enable PULL mode

    Toggle "Enable PULL Backups" to generate a secure token.

  3. Register store in LOX dashboard

    Add your store URL and PULL token in the LOX dashboard under CMS Sites.

PULL API Endpoints

POST /module/loxbackup/pull?action=backup   # Trigger backup generation
GET  /module/loxbackup/pull?action=status   # Get store status and sizes
GET  /module/loxbackup/pull?action=download # Download generated backup
POST /module/loxbackup/pull?action=refresh  # Regenerate PULL token

Troubleshooting

Module won't install

Ensure the module folder is named loxbackup (lowercase). Check folder permissions are set to 755.

Backup fails for large image directories

Increase PHP memory_limit and max_execution_time. For very large image libraries, consider disabling image backup and using a separate process.