Skip to content

How to migrate the database from Etherpad to Etherpad Lite

nemobis edited this page Aug 10, 2013 · 10 revisions

How to migrate the database from Etherpad to Etherpad Lite

Etherpad Lite provides a script to convert the Etherpad MySQL database (all revisions included) into a Etherpad Lite database. This will work for all DBMS supported by Etherpad Lite. Simply follow these steps:

  1. Go into your Etherpad Lite bin folder

  2. Copy the convertSettings Template cp convertSettings.json.template convertSettings.json

  3. Set the parameters of your Etherpad [old/source/original] database in convertSettings.json

  4. start the convert script with node convert.js convertSettings.json output.sql. This script will read all data from your old database and outputs a SQL file for creating a Etherpad Lite database. This may take a while.

    Note: If you get a message "Error: Cannot find module 'mysql'". npm install mysql You may need to do this for a number of different packages, including ueberDB and async.

  5. You now have an SQL file generated that you can import into your new Etherpad Lite database. The steps to do this depend on the database used:

MySQL

Prepare MySQL as described here.

Pipe the SQL into mysql mysql -u $YOUREPLITEUSER -p$YOUREPLITEPWD -h $YOURMYSQLHOST $YOUREPLITEDATABASE < output.sql

All other supported DBMS

  1. Setup your new Etherpad Lite instance to work with your preferred database. (redis, mongodb...)
  2. Go into your Etherpad Lite base folder
  3. Run import script node bin/importSqlFile.js bin/output.sql

General

Resources

For Developers

How to's

Set up

Advanced steps

Integrating Etherpad in your web app

for Developers

Clone this wiki locally