Xf_Post missing posts

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
203
Points
53

Reputation:

Hello everyone,

I have one issue but I hope that I can explain it clearly.

I moved my xenforo from one host to another, we failed after many times with the new host provider to move it. ( was an error when unarchiving the backup file).

later, I did that manually by myself and I moved all files manually from A to B.

after 10 days of using the new forum with the new host, I found that posts were not moved completely.

Example:

When I compared the two xf_post tables between the two databases, I found the new xf_post table is starting from post_id: 8002 not from post_id:1

now I have the full backup to that table from 1 - the last post before moving.

My question is:

is there any way to extract the posts from 1 - 8001 from the old backup table and insert it into the current table in the new database?

I wish that I had successed to explain the problem correctly.

Waiting for your assistance.

Thank you.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Hello everyone,

I have one issue but I hope that I can explain it clearly.

I moved my xenforo from one host to another, we failed after many times with the new host provider to move it. ( was an error when unarchiving the backup file).

later, I did that manually by myself and I moved all files manually from A to B.

after 10 days of using the new forum with the new host, I found that posts were not moved completely.

Example:

When I compared the two xf_post tables between the two databases, I found the new xf_post table is starting from post_id: 8002 not from post_id:1

now I have the full backup to that table from 1 - the last post before moving.

My question is:

is there any way to extract the posts from 1 - 8001 from the old backup table and insert it into the current table in the new database?

I wish that I had successed to explain the problem correctly.

Waiting for your assistance.

Thank you.
Wolf KnightYes but please be aware that the threads need to exist as well if you want to restore the posts.
Just open the backup with a good editor, which could handle big files, like glogg and extract the lines you require.

You can also restore that table to a new temp table and do a SELECT and INSERT command from it.
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
203
Points
53

Reputation:

Many thanks for your kind reply.
I deleted the existing table and I inserted the old one, now I lost the new threads after the moving.

Now how I can insert the missed threads by SQL quired one by one or the list of threads?
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Many thanks for your kind reply.
I deleted the existing table and I inserted the old one, now I lost the new threads after the moving.

Now how I can insert the missed threads by SQL quired one by one or the list of threads?
Wolf KnightYou can just do that if both Databases are on the same server, but please check to use the correct set of column names, if they are the same you can use this statement:

SQL:
INSERT INTO `old_DB`.`xf_post` SELECT * FROM `new_DB`.`xf_post` where post_id < 8002
 
View previous replies…

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

You can just do that if both Databases are on the same server, but please check to use the correct set of column names, if they are the same you can use this statement:

SQL:
INSERT INTO `old_DB`.`xf_post` SELECT * FROM `new_DB`.`xf_post` where post_id < 8002
BattleKingbut an additional question, why re these entries missing ?
Did you got error messages during the import ?
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
203
Points
53

Reputation:

so did you were able to import the missing posts now ?
BattleKingI dropped the old existing one and insert the old one (post table).
I lost 85+ new topics.
Now I don't know if I can insert some of them by post ID or not?
If I can insert one by one it will be fine, if not I will keep it like this and forget the issue.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

I dropped the old existing one and insert the old one (post table).
I lost 85+ new topics.
Now I don't know if I can insert some of them by post ID or not?
If I can insert one by one it will be fine, if not I will keep it like this and forget the issue.
Wolf Knightwhy you dropped it.
no one mentioned to drop them. if you dropped them now the tread should still be there, but the posts are missing of them
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

I dropped the old existing one and insert the old one (post table).
I lost 85+ new topics.
Now I don't know if I can insert some of them by post ID or not?
If I can insert one by one it will be fine, if not I will keep it like this and forget the issue.
Wolf Knightwhy you did not take any backup before doing something on the new DB ?
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
203
Points
53

Reputation:

why you dropped it.
no one mentioned to drop them. if you dropped them now the tread should still be there, but the posts are missing of them
BattleKingI dropped the table and insert the old table, all missed threads are displayed now.

The new ones are missed which are not very important like the old ones.

Now, if I can add the new 100+ one it will be fine, otherwise, I will ignore them.
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,068
Points
173

Reputation:

what method u backup db and data.
what mysql version in old & new host.
 

Wolf Knight

+Lifetime VIP+
+Lifetime VIP+
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Jul 3, 2019
Messages
203
Points
53

Reputation:

View previous replies…

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,068
Points
173

Reputation:

Top