# 备份和恢复你的钱包

### 备份：

本文档介绍了如何安全备份钱包文件以确保安全存储，以防止电脑或笔记本电脑损坏或丢失。 FIX Core下的FIX地址所需的所有数据存储在名为wallet.dat的单个文件中。此钱包采用Berkeley DB格式，并存储用于管理TWINS区块链余额的私钥/公钥密钥对。

#### 从FIX Core备份：

首先，永远不要在FIX Core运行时复制wallet.dat文件。\
如果钱包已在运行中，请单击“**文件” > “备份钱包”**&#x83DC;单。

![](/files/-LiSarcsJBDTkqnDLncj)

选择此菜单选项时，将出现一个对话框，指定文件的保存位置；输入文件的名称，选择一个位置，然后单击“**保存**”。

#### 通过复制wallet.dat进行备份

如果FIX Core未运行，你也可以通过将wallet.dat文件复制到另一个位置来备份您的钱包。此文件位于*FIX*数据文件夹中，你可以选择在安装期间指定此文件夹的位置，默认情况下，该文件夹在不同操作系统上的默认位置：

* **Windows**\
  `C:\Users\YourUserName\Appdata\Roaming\fix`\
  你可以通过**Windows Key + R**并键入`%APPDATA%\fix` 直接访问此文件夹
* **Linux**\
  \&#xNAN;**`/home/YourUserName/.fix`**\
  你可以直接在终端输入 `cd ~/.fix`或使用文件中的**Go> Enter Location** 菜单项在路径栏中输入 `~/.fix`来直接访问此文件夹
* **macOS**\
  \&#xNAN;**`/Users/YourUserName/Library/Application`**\
  你可以通过在终端输入`cd ~/Library/Application Support/FIX`\
  或在Finder中的**Go> Go To Folder**菜单项的对话框中输入\
  `~/Library/Application Support/FIX`\
  来访问此文件夹

确保FIX Core未运行，然后只需以正常方式将wallet.dat文件从此文件夹复制到另一个文件夹即可用于你的操作系统。

{% hint style="warning" %}
**如果你有masternodes，还必须备份masternode.conf文件。** \
**以及备份fix.conf，因为它包含你的自定义钱包设置。** \
**这两个文件与wallet.dat文件位于同一目录中。**
{% endhint %}

{% hint style="warning" %}
**将钱包文件备份到远离电脑的USB设备上。**
{% endhint %}

### 恢复：

要恢复备份，请在目标系统上安装FIX Core（如果已安装则将钱包关闭），并将*FIX*文件夹中的现有wallet.dat文件重命名为wallet.old

然后将备份钱包文件复制到*FIX*数据文件夹，并确保它名为wallet.dat。现在当你再次启动FIX Core时，它将加载新钱包；不要在FIX Core运行时更换wallet.dat，因为这会导致数据损坏。\
\
还有别忘了复制 *masternode.conf* 和 *fix.conf* 文件。


---

# 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://docs.fix.network/zhong-wen/fix-qian-bao/bei-fen-he-hui-fu-ni-de-qian-bao.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.
