View Full Version : How backup mysql in rescue mode
kunalkumar
09-05-2019, 03:10 AM
Hello
we have hard disk crash last night and now install new OS,
we have mount old hdd into server and boot server into rescue mode.
now i can see data and also /var/lib/mysql content, al mysql table are here,
there is no mysql to dump in this mode and i can only copy and migrate /mysql subfolders.
but problem is when i copy subfolder which is database name into new os, mysql cant load it,
when i search i can find some information about that we can export table into.sql with some tools.
run tools and folder, it export MYI and frm into .sql
any info or alternative solution ?
BenSages
11-14-2019, 01:36 AM
We can't simply copy the directory of a single database from old /var/lib/mysql to the new one. We need to start an instance of MySQL using the whole old /var/lib/MySQL and dump the required databases. This can also be done in MySQL recovery mode. After dumping the .sql, restore them to the instance of MySQL with the new datadir.
tuxandrew
11-18-2019, 12:31 AM
We can't simply copy the directory of a single database from old /var/lib/mysql to the new one. We need to start an instance of MySQL using the whole old /var/lib/MySQL and dump the required databases. This can also be done in MySQL recovery mode. After dumping the .sql, restore them to the instance of MySQL with the new datadir.
Yes, this is practical solution to use the old MySQL contents( /var/lib/MySQL) in another MySQL instance, take a dump of all database and restore the dump files accordingly.
Sherin
12-15-2020, 11:55 PM
Using a Windows computer
You use directly the SFTP protocol with FileZilla.
These are the elements you need for the connection:
Host: sftp://ip.add.re.ss (the IP address of your server)
Username: name of your user
Password: your password (available in your Console)
Port: 22
Once you are connected, you can see the files on your server in the area on the right, navigate to the folder /mnt/sda2/var/lib/mysql and double-click on the directory that you want to download to your computer.
Restore your database
To restore your data, simply upload the folder to your new installation by doing these tasks vice-versa.
Don't forget to restore the required permissions to the folder, if you have made the modification directly from the root account: chown -R mysql:mysql /var/lib/mysql/XXXX
jesica
12-21-2020, 03:27 AM
Open phpMyAdmin. On the directory tree on the left, click the database you want to back up. ...
Click Export on the menu across the top of the display. You'll see a section called “Export Method.” Use Quick to save a copy of the whole database. ...
Click Go.
techinfo
02-02-2021, 09:08 AM
In rescue mode only tables would be fetchable however data inside table wont be fetchable
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.