Recover MySQL Database
-
Ok, so here's my issue...I goofed. I had my website running on my CloudatCost server for awhile, but I've requested my money back from them via Paypal. So I've moved back to using the server I host myself as my main server. Well, I forgot I had a script setup on my CloudatCost server that exported the databases from that server and SCP'ed them to my local server. Then I had a script setup combined with a cron job to automatically import them.
I wrote two articles on Thursday, May 8th. The articles were written between 10AM and 2PM. I have Unitrends backup my local server every day at 7AM and 7PM. The cron job to import them runs at 4AM and 4PM. Originally the backup was designed to make sure it had the latest. The problem is I wrote the articles on my LOCAL server, which means when it imported the SQL dumps from the CloudatCost server, it overwrote what I'd done.
I'm trying a restore from Thursday at 7PM on the off chance the connection failed and it didn't overwrite them. My question is if there is some way to do something similar to what VSS does in Windows on Linux. I understand this was entirely my fault and I'm taking steps to correct it, including I've disabled the import cron job on my local server. That being said, is there any possible I can recover that data if my backup doesn't have it? I know the answer is probably no, but if anyone has any ideas I'd love to hear them! Thanks!
-
I should add I also back this server up at the VMware level, but that backup was at 7AM as well. So that doesn't do me much good either...
-
@scottalanmiller, any ideas?
-
VSS is actually the Windows "late to the party" copy of LVM on Linux. Linux was doing this and it was a standard "ha ha, Windows lacks this feature" that forced them to add VSS into Windows. LVM can do snapshots.
On FreeBSD and Solaris you can do the same thing with ZFS.
-
@scottalanmiller said:
VSS is actually the Windows "late to the party" copy of LVM on Linux. Linux was doing this and it was a standard "ha ha, Windows lacks this feature" that forced them to add VSS into Windows. LVM can do snapshots.
On FreeBSD and Solaris you can do the same thing with ZFS.
So how would I do what I am trying to do here?
-
@handsofqwerty said:
@scottalanmiller said:
VSS is actually the Windows "late to the party" copy of LVM on Linux. Linux was doing this and it was a standard "ha ha, Windows lacks this feature" that forced them to add VSS into Windows. LVM can do snapshots.
On FreeBSD and Solaris you can do the same thing with ZFS.
So how would I do what I am trying to do here?
Same as VSS. Set it up to run BEFORE you overwrite stuff. Like any backup or snapshot, you can't turn it on later and magically get stuff that hasn't been backed up or snapshotted yet.
-
@scottalanmiller said:
@handsofqwerty said:
@scottalanmiller said:
VSS is actually the Windows "late to the party" copy of LVM on Linux. Linux was doing this and it was a standard "ha ha, Windows lacks this feature" that forced them to add VSS into Windows. LVM can do snapshots.
On FreeBSD and Solaris you can do the same thing with ZFS.
So how would I do what I am trying to do here?
Same as VSS. Set it up to run BEFORE you overwrite stuff. Like any backup or snapshot, you can't turn it on later and magically get stuff that hasn't been backed up or snapshotted yet.
I know that principle. Is it on by default? How do you enable it so I can prevent this in the future?
-
No, it is not on my default. You don't want snapshots by default. You need to make sure that you have installed on LVM first. Then configure it to snapshot.
-
-
If you do an lvs command it will show you the current state of your LVMs. Many systems do not install LVM by default.
-
This thread has nothing to do with recovering a MySQL database.
You are attempting to revert file system changes to recover a changed database. this is completely different.
-
MySQL seems to be completely hosed. I'm going to have to rebuild the server, as restoring from backups even a week ago, even at the VM level, is not working!