Plesk is a web hosting platform with a control panel. This applies to the Windows Server hosting platform.
- In the Plesk control panel, navigate to the database of interest.
- Click "Export Dump".
- Download the dump file.
- In Windows, right-click the downloaded zip file, select "Properties".
- Click "Unblock" and click "OK".
- Double-click the zip file to reveal the file contained within.
- Copy (ctrl+c) the file and paste (ctrl+v) into the folder.
- Rename the file: at the end of the filename is an underscore followed by the date/time. Replace it with ".bak".
- Open SQL Server Management Studio; Expand "Databases".
- Right-click the database you want to replace with the newly downloaded data, select Tasks > Restore > Database.
- In the Source section, select "Device", click the box with the three dots (on the right side)
- In the window namced. "Select backup devices", click "Add", select the .bak file you pasted and renamed from the zip file. Click "OK" and then "OK" again to close the window.
- In the "Destination" section, make sure the correct database is selected to be restored.
- In the "Select a page" pane on the left side, choose "Files". In the "Restore As" column, remove the long string of numbers in the filenames for .mdf and .ldf files (this will overwrite the existing database files).
- In the "Select a page" pane on the left side, choose "Options". Check "Overwrite the existing database (WITH REPLACE)".
- Click "OK" and see the message that says "Database 'xyz' restored successfully." If you don't see the message, correct the issue and try again.
Good Luck!
For my web applications, I always need to re-connect the security configurations. To do this:
- Expand the database of interest; Expand "Security"; Expand "Users"; Delete the user, owner of the database.
- Expand the "Security" section in the Object Expolorer; Expand "Logins"; Double-click the owner of the database.
- In the "Login Properties" window for that Login, click "User Mapping" and click the database of interest. Then in the section labeled, "Database role membership for: xyz", check "db owner" and click "OK" to close the window.
Now you're done.