0

I have a PC with dev desktop on it where I had a local install of a drupal 7 site. I needed to reinstall windows on the PC and it wiped out my local install except I kept the old windows files, so I have access to the original site files.

What I don't have is a database dump of the local install.

With the old files, is there a way I can find the database table data? I can see in the old install of dev desktop the mysql/data content for the site, but I think I need additional files to complete the database tables, etc.

Thanks.

1 Answer 1

0

DevDesktop stores the mysql databases in its application installation folder. Assuming, you installed to the default location, in your PC backups, navigate to C:\Program Files (x86)\DevDesktop\mysql\data This folder contains a copy of the MySQL databases.

  • Restoring to PC for use or export:

    1. On the PC (assuming you haven't installed any other devdesktop sites), copy all the files and folders from the mysql/data backup directory into a fresh install's MySQL's data directory.
    2. For export: Start MySQL and export a copy for backup purposes/importing elsewhere as needed.
    3. For immediate use/development on PC: Start MySQL and your DevDesktop to confirm the site is running; resume normal dev desktop development on PC
  • Loading directly to a fresh install of DevDesktop, MAMP, Vagrant, or other MySQL service on Mac

    1. You could also copy the contents of that backup folder directly to the corresponding mysql/data backup directory on your Mac. NOTE: copying the entire directory will wipe all existing databases/user accounts in MySQL on your Mac's MySQL server, be sure to back it up first if you have existing data). If it's a fresh install of DevDesktop (or other) on the Mac, copy all the files and folders from the mysql/data backup directory of the PC to the corresponding folder on the Mac.
    2. Start DevDesktop or other local webserver app to confirm the site is running; resume normal dev desktop development on Mac
  • Merging with existing mySQL data, hosting database along side others on existing install of DevDesktop, MAMP, Vagrant, or other mySQL service on Mac

    1. If you do have existing MySQL data on the Mac (be it MAMP, DevDesktop, Vagrant instance or other), backup the corresponding /mysql/data folder from that application.
    2. Replace with the backup folder from the PC
    3. Start MySQL and export the database.
    4. Then swap the original Mac MySQL data back into place.
    5. Restart MySQL and import the database backup you just exported.
    6. Now you have both your PC devDesktop database and Mac databases available on the Mac.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.