YunoHost-Apps / codimd_ynh

CodiMD package for YunoHost
https://hackmd.io/
GNU General Public License v3.0
11 stars 12 forks source link

Transitionning from CodiMD to HedgeDoc. #55

Closed ericgaspar closed 3 years ago

ericgaspar commented 3 years ago

A new version 1.7 is coming soon... It is about time to transition this repo. To do so I have created a new repo : https://github.com/YunoHost-Apps/hedgedoc_ynh that should be good to go as far as naming and links... @kay0u pointed out the use of a Helper script to migrate files and database from CodiMD to HedgeDoc. I am wondering if it is worth the effort to implement this...

lapineige commented 3 years ago

Ok, then maybe I was a bit too hasty with this PR #54 …

Jaxom99 commented 3 years ago

Hi, is there a good migration path from codi_ynh to hedgedocs_ynh ? Is a DB dump/restore enough ?

ericgaspar commented 3 years ago

I dont know so I asked about it in the HedgeDoc Matrix room ... Here is the answer:

don't know if it's still that simple, but yes, it seems for quite a long time this worked. Not sure it still does https://community.hedgedoc.org/t/my-experience-migrating-from-hackmdio-codimd-to-hedgedoc/245

Jaxom99 commented 3 years ago

Great, thank you ! I'll let you know how it goes.

EDIT : it kind of worked. I had to sed codimd to Hedgedoc in the dump, to allow the new app to use the database. One thing lost is the upload files (like images) : they are stored in the /var/www/codimd/public/upload , so i should have copied them over.

So the path seems easy :

  1. Export files
  2. Dump the codimd PG database
  3. Remove codimd app
  4. Install hedgedoc app in same domain/path
  5. Stop the service and drop the new hedgedoc PG database
  6. sed the database dump for s/codimd/hedgedoc/g
  7. Create new database 'hedgedoc" and import the modified dump
  8. Copy files over
  9. Restart hedgedoc service :smile:
lapineige commented 1 year ago

@Jaxom99

I had to sed codimd to Hedgedoc in the dump

How do you do that ?

Could you please explain a little further how you do each individual step  ? In particular: 1) In which format ? 6) how do you "sed" it ? What's the command syntax ? 7) how can we do it ? Any specific parameters ?

Additional question : is the history kept ? Thank in advance ! :)