No internet connection
  1. Home
  2. Support

Export from hosted version to self-hosted version?

By Steve Mitchell @SteveM2019-10-28 16:14:28.619Z

I'm considering installing and hosting Talkyard on my own server so I can have a more user-friendly email when people interact with Talkyard. I'm using the hosted version now, and would want to export all of my current data so I could move it to a locally hosted install, but I can't seem to find that in the admin section anywhere...

Is there a way to do this?

  • 11 replies
  1. KajMagnus @KajMagnus2019-10-28 23:20:11.348Z

    Almost:

    1) You can export JSON for your site here: https://comments-for-seabits-com.talkyard.net/-/export-site-json (if you're logged in as admin).

    And you can 2) import JSON (similar to what I did, when I imported the Disqus comments).

    However, I have not yet 3) made the export and import format identical — so right now you cannot import the JSON you export.

    I've been planning to fix this, for many months (so that one can import & re-import JSON to another server, e.g. self hosted). And you asking about this, gives me motivation to get started :- )

    (I was previously a bit short of time, and didn't keep the exp & imp format in sync. Now I have in mind to add an end-to-end test that exports JSON for a site, and imports the same JSON to a new site, and checks that all seems fine after the import — so all this will get tested automatically, thereafter.)

    1. Progress
      with doing this idea
    2. @KajMagnus marked this topic as Started 2019-11-01 18:25:23.425Z.
    3. KajMagnus @KajMagnus2019-11-11 07:48:46.336Z

      Now I've made export-&-import mostly work — however, only textual contents for now; uploaded images not yet included in the export file.

      I think this'll cover like 99% of what one wants, for an embedded comments site, like yours. (Because then people typically reply with text comments, and don't post any images.)

      So, after I'm done with code review, and have released a new Talkyard version, you'll be able to export your site from Talkyard .net, and import your site to a self hosted server.

      1. H
        @Happyfeet012020-01-19 22:37:58.177Zreplies toKajMagnus:

        How can I import?

        1. KajMagnus @KajMagnus2020-01-19 23:06:52.859Zreplies toHappyfeet01:

          Edit: I think you've done the first step already — when you went to /-/export-site-json. So you can do as below — at your new server, click Restore Backup. /Edit

          First, at your old Talyard server (the one you're migrating away from),
          go here: https://comments-for-your-blog.talkyard.net/-/admin/settings/features, and enable Experimental features:

          Experimental    [ ]   Enables complicated and less well tested features, like custom HTML pages.
          

          Then click Save. A new tab appears, with the title Backups. Go there and click Download Backup.

          At your new Talkyard server, do the same things, but click Restore Backup.

          1. H
            @Happyfeet012020-01-20 05:04:56.744Z2020-01-20 05:14:23.042Zreplies toKajMagnus:

            Confused, Why is it wrong?

            Invalid UserStats json at index 1 in the 'ppStats' list: Bad json for UserStats for user id -42: 'topicsNewSince' looks like a unix time in seconds, should be milliseconds [EsE7UMKW2], json: {"lastSeenAt":1576506196488,"numLikesGiven":1,"topicsNewSince":0,"firstChatMessageAt":null,"numSolutionsProvided":0,"numDaysVisited":0,"numChatTopicsRepliedIn":0,"notfsNewSinceId":0,"numLikesReceived":0,"firstSeenAt":1576506196186,"numChatMessagesPosted":0,"numDiscourseTopicsEntered":0,"numChatTopicsEntered":0,"numDiscourseTopicsCreated":0,"lastPostedAt":1576506196488,"tourTipsSeen":[],"firstNewTopicAt":null,"emailBounceSum":0,"numDiscourseTopicsRepliedIn":0,"nextSummaryEmailAt":null,"lastSummaryEmailAt":null,"numSecondsReading":0,"numDiscourseRepliesRead":0,"userId":-42,"firstDiscourseReplyAt":1576506196488,"lastEmailedAt":1576513196048,"numChatTopicsCreated":0,"numChatMessagesRead":0,"numDiscourseRepliesPosted":1} [TyE76K0RKD2]

            1. KajMagnus @KajMagnus2020-01-20 05:56:41.786Zreplies toHappyfeet01:

              It's a bug — a runtime assertion I've added, and it's too restrictive. Shall I send you a private message with a JSON dump that doesn't have that problem? (because probably I won't fix the bug and deploy a new version, until later this week or next week)

              1. H
                @Happyfeet012020-01-20 05:58:53.837Zreplies toKajMagnus:

                yes sure..

                1. KajMagnus @KajMagnus2020-01-20 07:15:05.744Zreplies toHappyfeet01:

                  Ok, I'll do. Right now I'm just adding a bit more end-to-end test checks, so I'll be more certain that there won't be other errors.

                  (Previously I didn't include Not-logged-in / Guest users, when end-to-end test importing a site dump, and therefore I didn't find this bug.)

                  1. KajMagnus @KajMagnus2020-01-20 09:29:19.118Zreplies toHappyfeet01:

                    Sorry this takes a bit longer than what I thought. I'll reply later today (or tomorrow). (I'm in Europe, CET, ... what about you? Oh, CET you too obiously, Germany?)

                    The address to your server is https://comments.dasnetzundich.de/ right? (your new Hetzner server)

                    1. H
                      @Happyfeet012020-01-20 09:43:28.375Zreplies toKajMagnus:

                      Yes and Moin, Moin

                      i also located in Germany.
                      Yes https://comments.dasnetzundich.de is the Talkyard Server