1 # Transfering the config to/from the database
3 {! backend/administration/CLI_tasks/general_cli_task_info.include !}
5 ## Transfer config from file to DB.
8 You need to add the following to your config before executing this command:
11 config :pleroma, configurable_from_database: true
17 ./bin/pleroma_ctl config migrate_to_db
23 mix pleroma.config migrate_to_db
26 ## Transfer config from DB to `config/env.exported_from_db.secret.exs`
29 In-Database configuration will still be applied after executing this command unless you set the following in your config:
32 config :pleroma, configurable_from_database: false
35 To delete transferred settings from database optional flag `-d` can be used. `<env>` is `prod` by default.
39 ./bin/pleroma_ctl config migrate_from_db [--env=<env>] [-d]
44 mix pleroma.config migrate_from_db [--env=<env>] [-d]
47 ## Dump all of the config settings defined in the database
52 ./bin/pleroma_ctl config dump
58 mix pleroma.config dump
61 ## List individual configuration groups in the database
66 ./bin/pleroma_ctl config groups
72 mix pleroma.config groups
75 ## Dump the saved configuration values for a specific group or key
77 e.g., this shows all the settings under `config :pleroma`
82 ./bin/pleroma_ctl config dump pleroma
88 mix pleroma.config dump pleroma
91 To get values under a specific key:
93 e.g., this shows all the settings under `config :pleroma, :instance`
98 ./bin/pleroma_ctl config dump pleroma instance
104 mix pleroma.config dump pleroma instance
107 ## Delete the saved configuration values for a specific group or key
109 e.g., this deletes all the settings under `config :tesla`
114 ./bin/pleroma_ctl config delete [--force] tesla
120 mix pleroma.config delete [--force] tesla
123 To delete values under a specific key:
125 e.g., this deletes all the settings under `config :phoenix, :stacktrace_depth`
130 ./bin/pleroma_ctl config delete [--force] phoenix stacktrace_depth
136 mix pleroma.config delete [--force] phoenix stacktrace_depth
139 ## Remove all settings from the database
141 This forcibly removes all saved values in the database.
146 ./bin/pleroma_ctl config [--force] reset
152 mix pleroma.config [--force] reset