From c60477384ca2dc47cc356a9a80925aed854c9d2f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 13 Mar 2025 11:34:16 +0000 Subject: Add the db_json module. --- data/anope.example.conf | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'data') diff --git a/data/anope.example.conf b/data/anope.example.conf index 62f13b6a4..21f245272 100644 --- a/data/anope.example.conf +++ b/data/anope.example.conf @@ -1129,6 +1129,58 @@ module fork = no } +/* + * db_json + * + * Stores your data in a JSON file. This is currently experimental and has not + * been fully tested so make sure you have db_flatfile loaded as a secondary + * database module if you use this. + */ +#module +{ + name = "db_json" + + /* + * The file that db_json will write your main database to. + * + * This is relative to your data directory. + */ + database = "anope.json" + + /* + * The file that db_json will write third-party databases to. + * + * {name} will be replaced with the name of the module. + * + * This is relative to your data directory. + */ + module_database = "{name}.module.json" + + /* + * Sets how many days worth of backups should be kept. + * + * It is recommended that at the very least you keep one backup. Failure to + * do so may result in total data loss if you ever run out of disk space or + * have a power failure during a database write. However, if you're *REALLY* + * sure this won't happen you can disable backups by setting this to 0. + */ + backups = 14 + + /* + * The directory in which backups are kept. + * + * This is relative to your data directory. + */ + backup_directory = "backups" + + /* + * Allows Anope to continue writing the database even if the original can + * not be backed up. This is not recommended as it may result in total data + * loss during the circumstances described above. + */ + #ignore_backup_failure = yes +} + /* * db_sql and db_sql_live * -- cgit