Logo
ХелпдескУправление знаниямиБизнесуТарифыЧто такое KCS?Блог
Русский
Личный кабинет
Автоматизации и интеграции
© 2023 - 2026 ООО «Свормика». Swarmica - Платформа управления знаниями и ресурсами техподдержки. Версия: 6.1.2

#1661: Migration of knowledge base articles to Swarmica

Отредактирована: сегодня

Importing articles into Swarmica. This article describes how to import articles in .md file format into Swarmica.

Instructions

Recommendation: Name the .md file after the article's topic. For example, if the article's topic is 'How to create a ticket,' then the recommended file name is 'How to create a ticket.md'.

  1. Connect to the Swarmica server via SSH as root.

  2. Create the folder /root/swarmica/old_articles:

mkdir /root/swarmica/old_articles
  1. Upload the articles (.md files) to the created folder /root/swarmica/old_articles.

  2. Create a backup of the file /root/swarmica/docker-compose.yml:

cp /root/swarmica/docker-compose.yml{,.backup}
  1. Mount the folder with the articles into the django container. To do this, add the following line to the /root/swarmica/docker-compose.yml file in the django container section:
<...>
  django: &django
    image: reg.gl.swd.im/swarmica/backend:{SW_BACKEND_VERSION}
    depends_on:
      - postgres
      - redis
    volumes:
      - swarmica_ai_assistant:/swarmica/swarmica/ai_assistant/articles/:z
      - swarmica_runtime:/swarmica/swarmica/runtime_scripts/:z
      - swarmica_static:/swarmica/swarmica/static:z
      - swarmica_ugc:/swarmica/swarmica/attachments:z
      - swarmica_uploads:/swarmica/swarmica/uploads/:z
      - /root/swarmica/old_articles/:/swarmica/swarmica/old_articles/:z   # <------ This line
<...>

And restart Swarmica:

docker compose down; docker compose up -d
  1. Log in to the Swarmica UI as an Administrator.

  2. Create a new script in Swarmica - Settings - Scripts with the Administrator role.

  1. In the script settings, add this script and the following to Web Form Parameters and click Save:
[
  {
    "name": "author_uid",
    "type": "string",
    "required": false,
    "displayName": "Author's UID"
  },
  {
    "name": "category_name",
    "type": "string",
    "required": true,
    "displayName": "Article Category Name"
  }
]

It should look like this:

  1. In the web form of the script, specify the UID of the user who will be assigned as the author of the articles and the Name of the article category, then click Send:

  1. On the Swarmica server, in the /root/swarmica/docker-compose.yml file, remove the line added in step 5 and restart Swarmica:
docker compose down; docker compose up -d