Database Size Discrepancy in Server Migration

Live Free

Active member
I'm upgrading to a Dedicated server. We've done an initial migration and are going to do a final sync tonight.

In looking everything over, I found my xenforo database on the active site to be around 38 gigs. The database on the new server is around 34 gigs.

A backup from about a week ago was 31/32 gigs (ssh'd .sql file).

I'm wondering if anyone has any idea on 1) why the database size may shrink in this circumstance or 2) why a database size might unexpectedly increase, 3) if the database size listed in cpanel may be incorrect.

I'm concerned about data loss/corruption. My host did a test reimport of the database and got approximately 34 gigs again, with a slight increase in xf_posts.

Edit: In looking over the second import the discrepancy is smaller, but there still is one. 38.5 v 36.5
 
Last edited:
Could anyone weigh in here? Here are the largest database tables comparing the installations. Some reductions in size are irrelevant such as the error log or search index. Other tables have had modest decreases in size, including xf_post, xf_conversation_message, xf_data_registry, xf_thread, xf_user. They've lost rows and file size.

database size.webp

I'm at a total loss and my host has noted that it's odd, but migrated the database from the old server three times without achieving the original file size.

If someone could weigh in on this, even if its just a theory, 's would be greatly, greatly appreciated. Could it involve software versions, sorted deleted content, anything of that nature?
 
What about the content, is it intact?

As far as I can tell, yes. The site is operational, updated board counters checks out, I have not noticed any missing content/threads, and members have not reported any missing content or anything whatsoever. The only issue I came across was avatars not displaying, which my host fixed by adjusting the ownership permissions.

My concern is content actually might be missing, but if it's older content, people might not notice.

The severs are running a different version of MySQL Community Server, but I believe most everything else is the same.
 
Last edited:
The database size being different between different imports is normal, even when post count is the same.
 
@AndyB so I shouldn't be concerned with this? If that's the case I'll move on and finalize the server migration. I thought it might be an issue because the host support member orchestrating the migration said "that is odd", gave no explaination, and suggested it might transfer as the proper size of the old hosts server systems were disabled.
 
Just verify the total number of posts before and after the import, you will see the number is the same, yet the database size will differ, as I said perfectly normal.
 
yet the database size will differ, as I said perfectly normal.
Agreed. It's due to disk space usage being optimised.
Fragmentation of data occurs through normal usage (inserts , deletes or data etc.). When you export and import, the fragmentation will be very minimal and optimised during import process.
 
Top Bottom