# records.import()

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/domain/records/import/
Language: zh

`domain.records.import(zoneFile?) → Promise<{ added, parsed, skipped }>`

复制域域在其它区域用于我们区域的内容。 无需争论, 搜索所找到的内容就足够了, 跳过不可复制的记录 。

Status: the takeover · skips opaque records · a zone file is the reliable path

```javascript
await domain.records.import();              // what the search found
await domain.records.import(zoneFileText);  // a zone file from the old host
```

## 区域文件是可靠的路径 {#zonefile}

> **只有它能携带真正的生命 记录是无法观察到的**
>
> 观察找到答案; 它无法计算。 区域文件拥有所有的东西, 并具有真实值, 大多数主机可以导出一个。 没有它, 您就会复制可见的东西 。

## 被跳过的东西, 以及为什么 {#skipped}

| 跳过 | 因为 |
| --- | --- |
| 不透明地址 | 复制它指向一个从未听说过的单位 |
| `NS` 和区当局的记录, | 他们将委托给剩下的东道方。 |

留在名单上的不透明 [移民(移民)不透明](/zh/sdk/ref/domain/migration) - 手边完成,或者用一个区域文件完成。

## 返回值 {#returns}

```javascript
{ added: 15, parsed: 23, skipped: [{ type, name, reason }] }
```

读 `skipped`:它就是仍然缺少的东西的清单, 每个条目都说明了原因。

## 创建记录,一个一个一个一个地创建 {#records-created}

每一个记录都经过了普通路径,结果都按记录报告。 没有土地的记录被命名,而不是在批次结果中丢失——或者再次运行进口,或者写缺失的记录。

## 在建议开关前进行核查 {#verify}

```javascript
await domain.records.import();
const plan = await domain.migration();
if (plan.safeToSwitch) { /* now the registrar can be pointed here */ }
```

- [migration()](/zh/sdk/ref/domain/migration): 安全换位了吗?
- [records.list()](/zh/sdk/ref/domain/records/list): 检查结果

```python
domain.records.import_zone()                 # what the search found
domain.records.import_zone(zone_file_text)   # a zone file from the old host
```

```python
{"added": 15, "parsed": 23, "skipped": [{"type": ..., "name": ..., "reason": ...}]}
```

```python
domain.records.import_zone()
plan = domain.migration()
if plan["safeToSwitch"]:
    pass  # now the registrar can be pointed here
```
