Reinstalling Discourse but saving the data?



I installed Discourse quite some time ago, but the anonymous posting feature does not work - it never has. My site is updated to the newest version as well.

Is it possible to install Discourse again and carry the old data over?

(Jeff Wong) #2

Admin -> Backups. Should have everything you need there.

You can download current backups, and upload old backups for a migration or rollback. You will need to enable the allow restore setting in your new instance before you’re able to restore.

If you’re looking to simply rebuild your containers with your old data, you can ssh into your discourse install and run a ./launcher rebuild from your install folder.

(colin avolve) #3

what about a reinstall with no data?

(apoogies for the thread jack)

(Jeff Wong) #4

Your data is stored on disk – just shut down your containers, wipe/delete your data, and bring it up again.

your yml file will have a section like

  - volume:
      host: /var/discourse/shared/app
      guest: /shared

Shutdown your container, delete your folder (/var/discourse/shared/app) and ./launcher rebuild

(| full stack virgin) #5

I’m still curious how is the wiping done, especially on what commands to use. :frowning:
care to elaborate this method for a noob like me to understand?


(Sam Saffron) #6

Not following the question here… you specified in your setup where the data is coming from in:

  - volume:
      host: /var/discourse/shared/app
      guest: /shared

Nuke the /var/discourse/shared/app folder and there is no data, so everything is wiped.

(| full stack virgin) #7

i actually have another discourse and would want to delete all the category and post in one go…
seeing those tuts on how to wipe out… i don’t know how the step by step process (code in the consult) is done.

(| full stack virgin) #8

I was thinking at first if I can’t reinstall it …then probably just wipe the content and category

(| full stack virgin) #9

I’m good now. pretty much solved my issue with this tutorial :smiley:

(| full stack virgin) #10

What’s the command for nuke?

What I did was just deleting the folder

  - volume:
      host: /var/discourse/shared/app
      guest: /shared

but then I added that line of code again, the data is still there. so I’m assuming it’s still occupying space.

(Jeff Wong) #11

‘Nuke’ = ‘delete’.

If you restart your container, part of the container’s startup will be to create the folders it needs, which I’m assuming is why you’re seeing that folder?

(| full stack virgin) #12

The whole containers went berserk, and when I rebuild the app, it deleted my new content and installed a new fresh discourse installation.