Hi there, we recently changed our hard drive + fresh Os installation on our server. our main site was backedup using automated script. So when time came for restauration everything went well. However we have other site that had important Database information that have not ben backedup. We still have our old drive connected to the new installation. How and where is stored these database can i manualy restaure them ? they should of course be somewhere on the drive ?
You will first need to see if you can mount the drive. Login to your server as root. run fdisk -l to get a list of the drives on your system. it will look something like: # fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 60801 488384001 fd Linux raid autodetect Disk /dev/sdb: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 60801 488384001 fd Linux raid autodetect Disk /dev/sdc: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 1 60801 488384001 fd Linux raid autodetect Code (markup): You can see a list of already mounted file systems by typing: # df By comparing the two lists you will know which drive is not mounted and so you will know the name of the drive you want to mount. create a mount point for the old disk: # mkdir /mnt/olddisk try and mount the old disk # mount /dev/sdb1 /mnt/olddisk Note that your disk probably has more than one partition depending on how it is formatted you will probably want the last partition.
Thank mate, but i know how to mount a drive or list connected drive. My question is, where or how can i restaure mysql database from old drive. Thank
You might want to create a new db normally with the same database name. After that, copy tables data from the old db location. Usually, it's located in /var/lib/mysql
God thank mate ! Rep + Quick follow to for those who get the same problem. Mount your old drive to somewhere in a folder. If database was already exists and you want to overright say (y) to all.