[Solved] Import/Export MRF policies

is there a way to import/export MRF policies when using the in-database config ?

I migrated my instance and it lost all of it’s blocklist and wondered if I had to input all of that list everytime I had to migrate ?
Couldn’t find any way to import the list, so I wondered if it even was possible ?

with love,

Have you tried the JSON config dump? Transfering the config to/from the database - Akkoma Documentation

1 Like

Thanks a lot ! That’s actually exactly what I’ve been looking for.
Guess I passed by the option to load it back, I’m sorry…

Still, I’ve truncated the dump I’ve made from before the migration and got this mrf (I’ve truncated the long list of rejects for ease of reading)

import Config

config :pleroma, :mrf_simple, [media_nsfw: [{"woof.group", "Instance 18+, juste envie de pouvoir scroll au boulot"}]]

But the command load_from_file keep on returning a permission denied even as sudo…

** (File.Error) could not read file "/tmp/mrf_simple.json": permission denied
    (elixir 1.14.3) lib/file.ex:358: File.read!/1
    lib/mix/tasks/pleroma/config.ex:109: anonymous fn/1 in Mix.Tasks.Pleroma.Config.run/1
    nofile:1: (file)
    (stdlib 4.2) erl_eval.erl:748: :erl_eval.do_apply/7
    (elixir 1.14.3) lib/code.ex:425: Code.validated_eval_string/3

I’m posting this in a hope that my error is blatant enough but if it is not, please don’t waste time on the topic, I’ll just add them by hand and be a good boy :smiling_face_with_three_hearts:

does that file actually exist?

yes it does, I’ve been manipulating it