If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Restore database on the server hosting

Started by gomez, Jan 31, 2023, 10:29 AM

Previous topic - Next topic

gomezTopic starter

During the development of my WordPress website, I had to reinstall the local hosting on an open server. To prepare for this task, I archived the site directory, but unfortunately, I forgot to back up the database.

Now I am left wondering if my data is lost forever or if there is still a chance to recover it. In situations like this, it's always important to take precautionary measures and ensure that all relevant information is backed up properly. Even the slightest oversight can lead to significant setbacks and delays in your project completion.
  •  


Conet

If you're using InnoDB format to store your databases, it's crucial to know that there is no way to recover them. This is because InnoDB databases are stored in the ibdata1 file, and if this file is lost, all corresponding information will be lost permanently.

On the other hand, databases that are stored in MyISAM format can indeed be retrieved. However, when dealing with these files, it's important to exercise caution and pay close attention to any warnings that may appear on the website or during unpacking. It's unclear why the files were copied on top despite the warnings, but it serves as a reminder to always be vigilant when working with important data.
  •  

Jason Bowden

From the information you've provided in the comments, it seems that you accidentally deleted the folder containing the database you need, but you've successfully backed up the website itself. Additionally, your basket was cleared, and you're running Windows 10. Given these circumstances, your best course of action is to attempt to recover the lost files as soon as possible.

To increase your chances of success, it's crucial that you immediately halt any further file writing on the hard disk containing your system. You should also minimize your computer usage until the recovery process is complete.

In my experience, the most effective file recovery program is the free R Saver tool. After consulting your backed-up site, you can locate the name of the remote database you require in wp-config.php.

OpenServer databases are stored in the /OpenServer/userdata/ directory, depending on the type of version (MariaDB, MongoDB, MySQL, etc.) employed. To streamline your search for the lost files and avoid additional complications, I suggest limiting your focus to "/OpenServer/userdata/".
  •  

smith09

I have multiple computers at my disposal, specifically a Linux machine at 192.168.1.2 (also known as 192.168.0.2) and a Windows workstation at 192.168.0.3. After selecting MySQL for my application, I discovered that it was already installed on the Linux computer, but no one knew the password, and those who previously worked with it had forgotten it. After realizing that no one needed the existing installation, I deleted it in an attempt to reinstall it. However, I encountered memory issues and was unable to remedy them without a monitor, keyboard, and mouse. As a workaround, I decided to install MySQL on my more powerful Windows machine, which was available on my laptop at home.

Without delving into the installation process, I proceeded to create a backup of tables from my laptop and transferred them to the new database using the mysqldump command. Following this, I created a new database, restored the previous backup onto it, and verified the restoration by displaying the tables.

The restored tables were accessible locally via "localhost," but I faced issues when attempting to connect remotely through the IP address or allow clients to do so. Fortunately, using the MySQL Workbench program, I was able to address this problem by changing the localhost setting to "%". This allowed me to connect to the database from any location using console or code.

When it comes to working with different machines and databases, it's essential to have a flexible approach and be willing to explore alternative options to achieve your goals. Additionally, using backup tools and interactive programs such as MySQL Workbench can help you streamline complex processes.
  •  

keith.bowman

 Losing the database can indeed be a setback, but there may still be some options for recovery depending on the circumstances. Here are a few steps you could try:

1. Check your hosting provider: Some hosting providers perform regular backups of their servers. Contact your hosting provider to inquire if they have a backup of your database that can be restored.

2. Check your local machine: If you previously had a local copy of the WordPress installation, there's a chance that the database might still be present on your computer. Look for any MySQL or MariaDB dumps or files with .sql extensions.

3. Look for other backups: Check if you have any other backups, either through plugins or manual backups you created in the past. These backups may contain the database file you need.

4. Consult with professionals: If you're unable to recover the database on your own, it might be worth reaching out to a professional data recovery service. They may have specialized tools and techniques to retrieve data from failed or corrupted databases.

5. Contact your developer or consultant: If you have a developer or consultant who worked on your WordPress website, reach out to them for assistance. They may have additional insights or resources to help recover the database.

6. Search for temporary backups: Certain caching plugins or security plugins automatically create temporary backups of your database. Look for any backup files or folders created by these plugins in your WordPress installation directory. These backups might contain your database.

7. Explore your website logs: If your website was live before the crash, you may be able to access server logs. Check if the logs contain any SQL queries or database export-related actions. This information could help reconstruct at least a portion of your database.

8. Utilize database repair tools: There are tools available that can attempt to repair and recover corrupted databases. For example, MySQL has a built-in utility called "mysqlcheck" that can help repair tables and fix issues with the database structure.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...