Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Readme.md
discourse.sql.gz
discourse_bbcode.png
discourse_markuphtml.png
discourse_pg2018-10-02_21-21-42.sql.gz
flarum-0-1-0-beta-7-1.sql.gz
flarum.sql.gz
flarum_bbcode.png
flarum_markuphtml.png
tests_bbcode.txt
tests_markup_html.txt

Readme.md

Test database

There is a dump of a PostgreSQL Discourse database in this directory.

This database was generated with the script https://github.com/discourse/discourse/blob/master/script/profile_db_generator.rb, with modifications documented in this gist: https://gist.github.com/tpokorra/b2e34238dea0243572e822f649a35bab/revisions

How to run that script:

./launcher enter app
cd /var/www/discourse
# modify the script to add modifications as described above
vi script/profile_db_generator.rb
RAILS_ENV=production sudo -H -E -u discourse bundle exec ruby script/profile_db_generator.rb

To create a backup of the database:

./launcher enter app
sudo -u discourse pg_dump discourse | gzip > /shared/postgres_backup/discourse_pg`date '+%Y-%m-%d_%H-%M-%S'`.sql.gz

You find the result on your host machine, in directory /var/discourse/shared/standalone/postgres_backup.

For a detailed blog post, see https://www.pokorra.de/2018/10/creating-a-test-database-for-discourse-with-dummy-data/