Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost entries #11

Open
Ruffeng opened this issue Mar 12, 2018 · 8 comments
Open

Lost entries #11

Ruffeng opened this issue Mar 12, 2018 · 8 comments
Assignees
Labels

Comments

@Ruffeng
Copy link

Ruffeng commented Mar 12, 2018

Hi,
Yesterday I deployed a new WikiJs through Heroku.
Everything was fine (4 entries so far, 4 users)
For some reason today when I entered again, all the entries from entries table were removed. Just that table. Users remain there, sessions remain there, and I am not sure what is bruteforces but I have 4 entries there.

Any idea why my entries table were removed not after 12 hours??

@Ruffeng
Copy link
Author

Ruffeng commented Mar 12, 2018

I just entered again with just 1 page created, and it's removed again. It seems each time heroku puts to sleep my server, the table entries get removed

@Ruffeng
Copy link
Author

Ruffeng commented Mar 14, 2018

I tried to deploy to another Heroku server. Realized from MongoDB that the entries are not removed. Here is what I found. If I check the DB on Heroku (mLab addon), entries are there.
However, when I log in, the intro Page ( welcome to the wiki...) comes up, and removes all my entries automatically!
Any idea why it removes my entries after login??

@NGPixel
Copy link
Member

NGPixel commented Mar 15, 2018

The free plan of Heroku deletes your instance after 30 mins of inactivity. You must have git remote sync enabled in your Wiki.js config to make sure you don't loose anything.

If you have the sync setup and you come back to the site after 30 mins inactivity, you need to wait a min or 2 for the sync to occurs and re-download the files, which is why you see the "Welcome to the wiki" page instead of your content.

@NGPixel NGPixel self-assigned this Mar 15, 2018
@Ruffeng
Copy link
Author

Ruffeng commented Mar 15, 2018

Then, how is it possible that is just the table entries?
Users and Sessions still there

@NGPixel
Copy link
Member

NGPixel commented Mar 16, 2018

The entries table is a temporary cache, which is re-populated on start. Users is persistent data.

@beiota
Copy link

beiota commented Mar 18, 2018

@NGPixel , hello!
I've got the same issue on Heroku free plan. I understand the workaround, however I don't understand how to enable git remote sync for wiki js. Is there an article on that somewhere?
Thanks

@Ruffeng
Copy link
Author

Ruffeng commented Mar 18, 2018

@beiota, That's, in fact, a really good question. I found it confusing as well.
@NGPixel If you explain us a little bit how to do that, I can try to write a small step-by-step guide for future users.

@bmann
Copy link

bmann commented Aug 6, 2018

To enable git remote sync, you'll need a git repo somewhere -- like Github or Gitlab.

The Heroku environment variables -- which you can get to through Heroku > Your Wiki App > Settings, and then click on "Reveal Config Vars" -- need to be filled out with correct entries. Briefly, you'll need a user account on a git hosting service, and enter the username and password so that wikijs can push syncs to it.

I've copy/pasted the relevant entries below.

 "WIKI_GIT_URL": {
      "description": "URL of the remote git repository",
      "value": "https://github.com/Organization/Repo"
    },
    "WIKI_GIT_BRANCH": {
      "description": "Branch of the remote git repository to use. This branch must already exist.",
      "value": "master"
    },
    "WIKI_GIT_USERNAME": {
      "description": "Username to access the remote git repository",
      "value": "marty"
    },
    "WIKI_GIT_PASSWORD": {
      "description": "Password / PAT / Deploy Key to access the remote git repository",
      "value": "MartyMcFly88"
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants