Skip to main content

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:

EnvironmentMethodSpeed
VPS/Dedicated (exec available)mysqldump command โ†’ gzipFast
Windows (Laragon/XAMPP)mysqldump โ†’ PHP gzencodeFast
Shared hosting (exec disabled)Pure PHP/PDO dump โ†’ gzencodeModerate

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.cnf files that are deleted after use
  • Only superadmins can access the backup feature

๐Ÿ’ก Best Practicesโ€‹

  1. Create regular backups โ€” before updates, major changes, or periodically
  2. Download backups โ€” don't just keep them on the server
  3. Test restoration โ€” periodically verify backups can be restored
  4. 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

โญ๏ธ Next Stepsโ€‹