Backup & Restore Module: Protecting Your Data

Last updated on May 18, 2026 01:05

Data loss is a website owner's worst nightmare. Whether caused by a malicious attack, a server hardware failure, or a simple human error, losing your content and customer orders can be catastrophic.

The PolyCMS Backup & Restore Module provides peace of mind by allowing you to easily snapshot your entire system and restore it with a single click.

Features

  • Database Backups: Export your entire PostgreSQL or MySQL database (including all posts, users, and orders) into a secure .sql or compressed .gz file.

  • Filesystem Backups: Archive your entire storage/app/public directory, ensuring all your uploaded images and digital products are safe.

  • Automated Scheduling: Set it and forget it. Schedule daily or weekly backups via the system cron job.

  • One-Click Restore: Roll back your website to a previous state directly from the Admin Panel.

Manual Backups

To create a backup immediately:

  • Navigate to Settings > Backups.

  • Click the Create New Backup button.

  • Select whether you want to backup the Database Only, Files Only, or a Complete Backup (Both).

  • Click Start Backup.

Depending on the size of your site, this process may take a few minutes. Once complete, the backup file will appear in the list below, where you can download it to your local computer for safekeeping.

Automated Backups (Cron Required)

For comprehensive security, you should configure the module to run automatically.

  • Go to the Backup Settings tab.

  • Select your frequency: Daily, Weekly, or Monthly.

  • Set a "Retention Limit" (e.g., Keep only the last 5 backups). This prevents your server's hard drive from filling up with old backup files.

Automated backups rely on the Laravel Task Scheduler. Ensure that the cron job * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 is configured on your server!

Off-Site Storage Integration

While storing backups on your web server is better than nothing, a true disaster recovery plan requires off-site storage.

If your server's hard drive fails, both your website and your local backups are lost!

To solve this, pair the Backup module with the Cloud Storage Module. This allows you to automatically push your generated backup archives to Amazon S3, Google Cloud Storage, or DigitalOcean Spaces immediately after they are created.