Lost database after cpanel transfer
Hi,
I'm currently in the process of moving my cPanel accounts to a new server using the "Transfer or Restore a cPanel Account" tool.
But I encountered an issue with one cPanel account that had two databases. After the transfer completed, I deleted the account on the old server, to discover (on the new server) that only one database is showing, and the other seems to be missing.
I double-checked on the old server, but the account has been deleted. I recreated the account on the old server and restored the old backups (3 retention: 1, 2, or 3 days ago). Surprisingly, even on the old server, I couldn't locate the second database.
I 100% remember that the database existed before I moved the website to the new server, as the website was functioning correctly at that time.
If anyone has an explanation or a solution on how to recover the lost database, I would greatly appreciate your assistance.
Regards,
-
While reviewing my notification emails, I noticed that I received an email five days ago informing me that a backup was unable to complete. Specifically about the account with missing database:
[2024-01-03 02:43:37 +0200] mysqldump: Couldn't execute 'show fields from `wp_actionscheduler_logs`': Table './databaseuser/wp_
actionscheduler_logs' is marked as crashed and should be repaired (145) The database was flagged as crashed, which explains why it couldn't be transferred to the new server and couldn't be restored on the old server either.
Anyone have a solution please ?
0 -
In WHM, under SQL Services there is a "Repair a MySQL® Database" option which should help (there are command line tools to do this as well).
If you don't have WHM access, you might be able to use `REPAIR TABLE wp_actionscheduler_logs` as an SQL command in a MySQLAdmin window.
Alternatively, disable the ActionScheduler plugin in WordPress - delete the crashed table using MySQLAdmin or cPanel or WHM, and then re-enable the plugin - it *should* regenerate the table.
Worst case - delete the crashed table, then recreate the table by hand using the data in https://github.com/woocommerce/action-scheduler/blob/trunk/classes/schema/ActionScheduler_LoggerSchema.php :
CREATE TABLE wp_actionscheduler_logs (
log_id bigint(20) unsigned NOT NULL auto_increment,
action_id bigint(20) unsigned NOT NULL,
message text NOT NULL,
log_date_gmt datetime NULL default '0000-00-00 00:00:00',
log_date_local datetime NULL default '0000-00-00 00:00:00',
PRIMARY KEY (log_id),
KEY action_id (action_id),
KEY log_date_gmt (log_date_gmt)
);0 -
Hi rbairwell,
Thank you for your response. The current problem lies in locating the database to initiate repairs. Unfortunately, I can't seem to locate it on either the new server or the old server.
It appears that a broken database could not be transferred OR restored from a backup.
My inquiry is twofold: Is there a method to restore an account that includes a broken database? Additionally, is there a way to identify and address the broken database within a transferred account? Any guidance on these matters would be greatly appreciated.
0 -
Do you have a backup of the account? If so, do you see the bad database in the backup? If you do, restoring the account would be the easiest solution.
0 -
Yes I have backups on the old server. I can see the backups in Backup > Backup restoration.
I tried to restore a backup but the bad database is not found.
Maybe is there a way to download it as a sql file ? and restore it manually ?
0 -
It would be best to manually unzip the backups and confirm the database exists instead of trying to restore the backups. It's possible that you don't have any backups that are old enough to contain the data.
I'd find the oldest backup you have and see if the database is there first.
0
Please sign in to leave a comment.
Comments
6 comments