new hdd booting using old hdd mbr and partition tables

General support questions
nike
Posts: 72
Joined: 2018/05/07 14:05:24

Re: new hdd booting using old hdd mbr and partition tables

Post by nike » 2023/05/18 12:08:29

jlehtone wrote:
2023/05/17 08:06:22
A disk has partition/volume(s). Those have filesystem. Filesystem has files.

When you say that you "can access the secondary disk", we do assume that you mean
that you have mounted the filesystem that is on the disk and therefore can access the files.

A database engine is an application that reads/writes files of specific (database format).
The files have the data. If you can install the same (or compatible) database application
to you functional operating system and configure the engine to use the existing files, then
you should have access to the data.

Assuming the 1TB disk is unreliable or to be decommissioned, the first step would be to copy
the files of the database into the 320GB disk. Then configure the database engine.

You did not tell which database engine was used in the old system, so we can't even start
to guess where within the filesystem the database files are.
Thanks for reply
Accprding to you I installed mysql database in another Hard disk and copied all database files to there but it is not running .

showing this error
#1146 - Table 'SREEMA.ACC_ACTUNITS' doesn't exist

My database name is SREEMA and tables name ACC_ACTUNITS
all tables in database showing the same error . i also tried to take backup but showing same error .Moreover i copied database files from this path /var/lib/mysql to the same path of another hard disk
Last edited by nike on 2023/05/18 12:12:14, edited 1 time in total.

BShT
Posts: 585
Joined: 2019/10/09 12:31:40

Re: new hdd booting using old hdd mbr and partition tables

Post by BShT » 2023/05/18 12:10:55

any backup?

nike
Posts: 72
Joined: 2018/05/07 14:05:24

Re: new hdd booting using old hdd mbr and partition tables

Post by nike » 2023/05/18 12:15:58

BShT wrote:
2023/05/18 12:10:55
any backup?

my old hard disk files are there and i can access it properly . i have old backup but i want to get without any loss. otherwise i know how to restore backup

nike
Posts: 72
Joined: 2018/05/07 14:05:24

Re: new hdd booting using old hdd mbr and partition tables

Post by nike » 2023/05/18 12:26:13

Is there any hope to recover current database from old hard disk..please

BShT
Posts: 585
Joined: 2019/10/09 12:31:40

Re: new hdd booting using old hdd mbr and partition tables

Post by BShT » 2023/05/18 12:50:49

try at new server install:

# systemctl stop mysqld
# mv /var/lib/mysql /var/lib/mysql.old
# mkdir /var/lib/mysql
# cp -R /mysql/from/old/HD/* /var/lib/mysql/
# setenforce 0
# systemctl start mysqld

you may have to manage some structure errors

https://www.digitalocean.com/community/ ... s-in-mysql

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: new hdd booting using old hdd mbr and partition tables

Post by TrevorH » 2023/05/18 13:17:45

I'd replace 'setenforce 0' with restorecon -RFv /var/lib/mysql and also check the permissions on the new /var/lib/mysql are teh same as those on /var/lib/mysql.old
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply