# FTP访问

## 入门

FTP允许您每 24 小时从服务器批量上传数据。这适用于 Excel 和 XML 格式。用户需要设置一个主动 FTP 连接以及要从服务器检索的文件名。

**可接受格式：** XLSX 和 XML

\*\*推荐：\*\*具有 20 到 50,000 个认证的小型、中型和大型认证机构

***

### 先决条件

1. 设置主动 FTP 连接。
2. \_在你的 FTP 服务器上，使用你的[格式化数据](/accreditation-bodies/ab-zh/data-management/import-certification/certification-file-templates.md)上传文件(.xlsx 或 XML)。
3. 定义你想从服务器检索的文件名。

***

### 如何通过 FTP 导入认证机构数据

1. 转到 **“导入认证机构”** 页面。
2. 在导航选项卡中选择 **“FTP”**。
3. 填写或编辑以下文本字段：
   * FTP 访问状态
     * <mark style="color:green;">**激活**</mark>，*持续从 FTP 获取/下载文件*
     * <mark style="color:red;">**非激活**</mark>，*停止从 FTP 获取/下载文件*
   * FTP 服务器协议
     * **FTP**，*依赖用户名和密码进行验证*
     * **SFTP**，*使用 SSH 密钥进行验证，更安全*
   * 服务器主机
   * 服务器端口
   * 服务器用户名
   * 服务器密码。
     * 如果选择了 **SFTP**，则添加 **私钥**。
4. 点击“**测试 FTP 连接**”按钮，以检查 FTP 是否连接成功。
5. 一旦连接成功，点击“**保存并继续**”按钮。
6. 在下一个屏幕中，添加你想要从 FTP 服务器获取的文件名。
   * 如果 FTP 目录中有多个文件符合常用命名约定，可以选择 **“通配符”** 选项

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>示例:</p><p>文件名是 <strong>certs</strong>，并且已选择“通配符”选项。</p><p>系统将在目录中查找以下文件名：</p><ul><li><strong>certs</strong>_1.xlsx</li><li>2_<strong>certs</strong>.xlsx</li><li>3_<strong>certs</strong>_4.xlsx</li></ul></div>
7. 添加完成后，点击“**获取数据**”按钮。
8. 完成后，流程进入 **步骤 2**，初始化数据验证。
9. 验证成功后，您的数据将成功添加到 IAF CertSearch。

***

## 定义文件名

为了使 IAF CertSearch 能够从服务器检索数据并存储到 IAF CertSearch 数据库中，需要定义或指定文件名。

{% hint style="info" %}
**先决条件**

在定义文件名之前，请确保您已经将包含您的[格式化数据](/accreditation-bodies/ab-zh/data-management/import-certification/certification-file-templates.md)的文件上传到 FTP 服务器中。
{% endhint %}

1. 在 FTP 设置页面中，转到 **FTP 文件名** 部分。
2. 点击“**添加 FTP 文件名**”按钮。
3. 在添加 FTP 文件名的弹出窗口中，添加您想要检索的文件名。

##

## 从 FTP 获取文件

文件名定义后，您可以选择以下方式之一：

* **立即获取文件**，手动点击“**获取文件**”按钮。
* **在 FTP 爬行计划期间获取**，计划每天开始于 **UTC 01:00 am**。

#### 规则

* <mark style="color:red;">对您的文件进行的任何更改将每 24 小时更新一次。</mark>
* <mark style="color:red;">如果文件名不匹配，系统将不会上传该文件。</mark>
* <mark style="color:red;">如果 FTP 文件名部分没有文件名，则会跳过获取文件的过程。</mark>

## FTP 数据导入活动

允许您查看所有 FTP 导入活动。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.iafcertsearch.org/accreditation-bodies/ab-zh/data-management/import-certification-body/ftp-access.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
