question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some pads are re-created as empty after switching to MySQL

See original GitHub issue

I am trying to migrate from dirtydb to mysql, but for some reason after switching, several Pads are lost. Migration was done with the included script bin/migrateDirtyDBtoMySQL.js after shutting down EP and changing the config to MySQL.

For example a pad X which I created about 1 week ago and last edited yesterday is shown as newly created if I access it after restarting Etherpad with the MySQL config.

...
[2014-11-13 19:02:27.705] [INFO] ueberDB - Flushed 1 values
[2014-11-13 19:02:27.804] [INFO] socket.io - handshake authorized 'eYPi7Au9EE-AU6yaUcv-'
[2014-11-13 19:02:27.805] [INFO] ueberDB - Flushed 1 values
[2014-11-13 19:02:27.958] [INFO] access - [CREATE] Pad "Nice_Rides": Client eYPi7Au9EE-AU6yaUcv- with IP "148.251.*.*" created the pad

When looking at the store table, the contents of pad X is there. But for some reason Etherpad decides to ignore that and create an empty pad instead. If I switch back to dirtydb, the existing content of the Pad is correctly shown.

In settings.json only the DB config was touched. Using EP 1.4.1

What can I do?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tyklingcommented, Feb 26, 2018

I also have this issue and have tried a bunch of times to get a dirty.db migrated to Postgres using bin/migrateDirtyDBtoRealDB.js

The output from the migration script looks promising, it counts down to 0 and then waits a while and says it has flushed a bunch of lines:

[etherpad@pad2 ~/etherpad-lite]$ node bin/migrateDirtyDBtoRealDB.js 
[2018-02-26 22:13:31.094] [INFO] console - Waiting for dirtyDB to parse its file.
[2018-02-26 22:13:51.278] [INFO] console - Loaded 153755 records, processing now.
[2018-02-26 22:13:51.281] [INFO] console - Records not yet flushed to database:  153700
[2018-02-26 22:13:51.283] [INFO] console - Records not yet flushed to database:  153600
...
[2018-02-26 22:13:53.533] [INFO] console - Records not yet flushed to database:  200
[2018-02-26 22:13:53.533] [INFO] console - Records not yet flushed to database:  100
[2018-02-26 22:13:53.534] [INFO] console - Records not yet flushed to database:  0
[2018-02-26 22:13:53.534] [INFO] console - Please wait for all records to flush to database, then kill this process.
[2018-02-26 22:17:25.677] [INFO] ueberDB - Flushed 153755 values

This is with 1.6.3 but I had this same issue when I tried to migrate about a year ago. After faffing about with it for a few days I just gave up and stuck with dirty.db.

I am very interested in getting this working. It seems like not all the data is making it to Postgres for some reason. This means that many of the pads are created as new pads when I open them on the new server.

Any suggestions?

0reactions
rhansencommented, Sep 28, 2021

@JCMais Please file a new bug report. I’m surprised John saw your comment on this 7-year-old bug that is unlikely to be related to your issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

2 Server Error Message Reference - MySQL :: Developer Zone
Occurs for failure to create or copy a file needed for some operation. Possible causes: Permissions problem for source file; destination file already...
Read more >
How to set default value as empty string for all rows at once in ...
In MySQL, while creating a table, I'like to have empty string '' as value for all needed columns instead of 'NULL' .
Read more >
What is the most straightforward way to pad empty dates in sql ...
I'm building a quick csv from a mysql table with a query like: select ...
Read more >
An Intermediate MySQL Tutorial - Scripting, Data Types ...
This article explains some concepts in depth, such as scripting and data types. Read "MySQL for Beginners" for the basics.
Read more >
15 Changes in MySQL 8.0.20 (2020-04-27, General Availability)
This runs counter to the SQL standard, which stipulates that when ON EMPTY is specified, it must always come before any ON ERROR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found