PolyCMS Database Backup and Restore for RISE CRM
PolyCMS for RISE CRM includes a scoped Database Backup and Restore utility under PolyCMS > Tools > Backup / Restore (/polycms/tools#backup_restore). It exports and restores SQL snapshots covering only the dedicated PolyCMS {db_prefix}blog_* tables (default prefix rise_blog_*), leaving your core RISE CRM clients, projects, invoices, estimates, and support tickets completely untouched.
Accessing Backup and Restore
Navigate to PolyCMS > Tools and select the Backup / Restore tab (or open /polycms/tools#backup_restore directly using URL hash deep-linking). Both backup generation and SQL restoration are restricted to RISE CRM Administrators (polycms_is_admin()).
Private backup working storage lives outside the public media folder at writable/polycms/backups/, protecting operational files from direct web access.
Creating a Database Backup
- Navigate to PolyCMS > Tools and open the Backup / Restore tab.
- Under Database Backup, click Download SQL Backup.
- PolyCMS dynamically resolves your RISE CRM database prefix (
$db->getPrefix(), defaultrise_) and generates an SQL dump containing table drop/create definitions and insert statements for your CMS tables. - Your browser downloads a timestamped file named
polycms_backup_YYYY-MM-DD_HH-ii.sql. - Store the
.sqlsnapshot in a secure off-site location (such as encrypted cloud storage or a versioned backup drive).
PolyCMS 19-Table Database Architecture
PolyCMS stores all website content, taxonomy, navigation, extensions, and settings in 19 dedicated InnoDB tables prefixed with your RISE CRM database prefix ({db_prefix}, default rise_):
| Table Group | Tables ({db_prefix} + Name) |
Count |
|---|---|---|
| Content | blog_posts, blog_pages, blog_page_meta |
3 |
| Taxonomy | blog_categories, blog_tags, blog_post_categories, blog_post_tags, blog_post_meta |
5 |
| Engagement | blog_comments |
1 |
| Media | blog_media |
1 |
| Navigation | blog_menus, blog_menu_items, blog_widgets |
3 |
| Extensions | blog_plugins, blog_plugin_options, blog_themes, blog_theme_options |
4 |
| Configuration | blog_settings, blog_permalink_settings |
2 |
No core RISE CRM business tables (such as clients, projects, invoices, tickets, tasks, or users) are modified by PolyCMS backup or restore operations.
Restoring from an SQL Backup
- Navigate to PolyCMS > Tools > Backup / Restore.
- Under Database Restore, select a valid
.sqlbackup file (maximum file size: 50 MB). - Click Restore Database.
- Confirm the operation inside the SweetAlert2 confirmation dialog.
- PolyCMS validates the SQL file, executes the restore inside a database transaction with foreign key checks temporarily paused, and automatically clears the frontend HTML cache (
writable/polycms/cache/) upon completion.
Built-In SQL Restore Security Guardrails
Before running a single statement, Tools::restore() enforces strict server-side security validation:
- File Type and Size Check: Accepts only
.sqlfiles up to 50 MB. - Blocked Dangerous Directives: Rejects files containing
INTO OUTFILE,INTO DUMPFILE,LOAD_FILE,LOAD DATA,GRANT,REVOKE,CREATE/ALTER/DROP USER, orCREATE/DROP DATABASE. - CMS Table Allowlist: Permits
DROP TABLE,CREATE TABLE,INSERT,REPLACE, andTRUNCATEstatements only when the target table strictly matches{db_prefix}blog_*or{db_prefix}polycms_*. Any statement targeting a core RISE CRM table is immediately blocked and logged.
Important Warnings and Best Practices
- Backup Before Restoring: Restoring an SQL snapshot overwrites your existing PolyCMS tables. Always download a fresh backup before restoring an older snapshot or running Generate Content Template in Demo Data.
- Back Up Uploaded Media Separately: SQL backups preserve database records (including
blog_mediametadata) but do not include physical image or file uploads. Back up{rise_crm_root}/files/polycms/alongside your.sqlfiles for complete disaster recovery. - Maintain Full CRM Backups: Because PolyCMS isolates backups to CMS tables, keep your standard server-level RISE CRM database backups running on a regular schedule.
- Verify on Staging First: Before restoring a major snapshot onto a live company site, test the
.sqlfile on a staging RISE CRM instance.
Related Documentation
- Import, Export & Demo Data for RISE CRM - Transfer posts, pages, categories, and tags via lightweight JSON archives or manage demo datasets.
- PolyCMS Architecture Overview - Review the full 19-table schema and storage layout (
files/polycms/vswritable/polycms/). - Troubleshooting & Common Issues - Recovery steps for permissions, cache, or migration issues.