0

I've been at this for a couple days now and it's not looking good. I'm trying to migrate a Craft CMS 3.9.5 (latest) database running on MariaDB to Postgres using pgloader 3.6.10.

I've attempted this in many ways, direct server to server, dump to server, dump to formatter to server, with no success. Most were related to special characters and then ran into \0x00 values not being accepted.

Brad Bell's guide seems the most reliable but I keep running into errors like:

2023-11-05 12:28:30.647 GMT [14632] CONTEXT:  COPY craft_elements, line 566870
2023-11-05 12:28:30.647 GMT [14632] STATEMENT:  
        copy public."craft_elements" ("id","canonicalId","draftId","revisionId","fieldLayoutId","type","enabled","archived","dateCreated","dateUpdated","dateLastMerged","dateDeleted","uid") FROM STDIN
2023-11-05 12:28:30.681 GMT [14632] FATAL:  terminating connection because protocol synchronization was lost
2023-11-05 12:28:30.681 GMT [14619] FATAL:  terminating connection because protocol synchronization was lost
2023-11-05 12:28:30.683 GMT [14619] LOG:  could not send data to client: Broken pipe
2023-11-05 12:28:30.683 GMT [14632] LOG:  could not send data to client: Broken pipe
copy public."craft_searchindex" ("elementId","attribute","fieldId","siteId","keywords") FROM STDIN
FATAL:  terminating connection because protocol synchronization was lost
LOG:  could not send data to client: Broken pipe
2023-11-05 12:33:19.751 GMT [14735] STATEMENT:  
        copy public."craft_searchindex" ("elementId","attribute","fieldId","siteId","keywords") FROM STDIN
2023-11-05 12:33:19.853 GMT [14735] ERROR:  unexpected EOF on client connection with an open transaction
2023-11-05 12:33:19.853 GMT [14735] CONTEXT:  COPY craft_searchindex, line 1255797

It's also worth mentioning that these errors don't display when running pgloader. All I get there is "Killed", I had to find these in postgres logs.

At this point I'm not sure if these errors are postgres or data related. The data is being transferred from two servers in the same network. Chances of network issues are HIGHLY unlikely.

I've tried raising the shared_buffers and max_wal_size with no changes and even making a clone of the source server so it runs standalone with no other connections.

Does anyone have any recommendations or alternatives?

1
  • Any chance this will be easier if I upgrade to Craft 4 first? Cuz I also have that in my to do list. 🤔
    – cballenar
    Commented Nov 5, 2023 at 19:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.