Skip to content

How does the demo module work?

izmeez edited this page Oct 1, 2023 · 5 revisions

When a snapshot is created the demo module creates three files: an info file with details including the title and description; a sql dump of the current database; and the files in the current config active folder as a compressed archive tar.gz file.

When a site is reset the existing database is replaced with the saved database after dropping all existing tables, and the files in the config active folder are completely replaced with those saved in the snapshot.

On reset the database is completely restored including the cache files at the time the snapshot was saved. The caches are not flushed.

The demo module leaves the user added files and images untouched. It does not create a backup of these files. Thus files and images added or removed between snapshots will be the same when a previous snapshot is reset. This may be an important consideration when creating a demonstration site ensuring that files and images cannot be uploaded, deleted or changed unless other measures are added to verify the files. If the files and images are to be preserved another application or technique will be required.

Clone this wiki locally