-[³]: `pg_restore` will add data before adding indexes. The indexes are added in alphabetical order. There's one index, `activities_visibility_index` which may take a long time because it can't make use of an index that's only added later. You can significantly speed up restoration by skipping this index and add it afterwards. For that, you can do the following (we assume the akkoma.pgdump is in the directory you're running the commands):
-
-```sh
-pg_restore -l akkoma.pgdump > db.list
-
-# Comment out the step for creating activities_visibility_index by adding a semi colon at the start of the line
-sed -i -E 's/(.*activities_visibility_index.*)/;\1/' db.list
-
-# We restore the database using the db.list list-file
-sudo -Hu postgres pg_restore -L db.list -d akkoma -v -1 akkoma.pgdump
-
-# You can see the sql statement with which to create the index using
-grep -Eao 'CREATE INDEX activities_visibility_index.*' akkoma.pgdump
-
-# Then create the index manually
-# Make sure that the command to create is correct! You never know it has changed since writing this guide
-sudo -Hu postgres psql -d pleroma_ynh -c "CREATE INDEX activities_visibility_index ON public.activities USING btree (public.activity_visibility(actor, recipients, data), id DESC NULLS LAST) WHERE ((data ->> 'type'::text) = 'Create'::text);"
-```
-[⁴]: Prefix with `MIX_ENV=prod` to run it using the production config file.