Database Backups
FeedbackPulse includes a built-in backup system (Admin โ Backups) that lets you create, download, and manage database backups directly from the admin panel.
๐ง How It Worksโ
FeedbackPulse intelligently detects your hosting environment and picks the best backup method:
| Environment | Method | Speed |
|---|---|---|
| VPS/Dedicated (exec available) | mysqldump command โ gzip | Fast |
| Windows (Laragon/XAMPP) | mysqldump โ PHP gzencode | Fast |
| Shared hosting (exec disabled) | Pure PHP/PDO dump โ gzencode | Moderate |
The system automatically falls back to the PHP-based method if exec() is disabled or mysqldump is not found. This means backups work on every hosting type, including shared hosting where shell commands are restricted.
๐ Featuresโ
Create a Backupโ
Click Create Backup to generate a new database dump. The file is saved to storage/app/backups/ with a timestamped filename.
Download a Backupโ
Click the download icon next to any backup to download the .sql.gz file.
Delete a Backupโ
Click the delete icon to remove a backup file. This only deletes the backup file โ your live database is not affected.
Backup Listโ
Shows all existing backups with:
- Filename
- File size
- Creation date
- Download/Delete actions
๐ Securityโ
- Backups are stored inside
storage/app/backups/(not publicly accessible) - Database passwords are handled via temporary
.my.cnffiles that are deleted after use - Only superadmins can access the backup feature
๐ก Best Practicesโ
- Create regular backups โ before updates, major changes, or periodically
- Download backups โ don't just keep them on the server
- Test restoration โ periodically verify backups can be restored
- Automate โ set up a cron job for automatic daily backups if needed
Manual Backup via Command Lineโ
cd /var/www/feedbackpulse-saas
mysqldump -u feedbackpulse -p feedbackpulse | gzip > storage/app/backups/manual_$(date +%Y%m%d).sql.gz
Restoring a Backupโ
gunzip < storage/app/backups/backup_file.sql.gz | mysql -u feedbackpulse -p feedbackpulse