Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 1.81 KB

File metadata and controls

54 lines (39 loc) · 1.81 KB

← Back to Docs Index

📊 Backing Up And Restoring The MySQL Database

Windows

We will use mysqldump command to do this.

Important: ImagePerfect stores file paths in the database, so your image files must remain in the same locations (drive letter, folder paths, etc.) for a restore to work.

  1. Open Command Prompt (not PowerShell) and navigate to your MySQL bin directory:
cd C:\Program Files\MySQL\MySQL Server 8.0\bin
  1. To backup:
mysqldump -u root -p imageperfect > C:\MySQLBackup\imageperfect_YYYY_MM_DD.sql
  • It will ask for your root server password after hitting enter.
  • Your backup SQL file will now be in C:\MySQLBackup check and ensure it is there.
  1. To restore:
mysql -u root -p imageperfect < C:\MySQLBackup\imageperfect_YYYY_MM_DD.sql
  • It will ask for your root server password after hitting enter.
  • Your database should now be restored.

NOTE: It would be best to try this before spending too much time organizing your photos in the app. Make sure you can backup before wasting time. It's easy to spend hours adding cover images, tags, and notes about the event/day.

Ubuntu

This is basically the same as Windows

  1. Open a terminal in your desired backup location.
  2. To backup:
sudo mysqldump imageperfect > imageperfect_YYYY_MM_DD.sql
  • Ubuntu will ask for your root password after hitting enter.
  • This will dump the imageperfect database in the backup location.
  1. To restore:
sudo mysql imageperfect < imageperfect_YYYY_MM_DD.sql
  • Ubuntu will ask for your root password after hitting enter.
  • Your database should now be restored.
  • Obvious or maybe not, but terminal should be opened in the location/folder where your backup file is located for the restore to work.