> For the complete documentation index, see [llms.txt](https://zel.gitbook.io/zelcore/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zel.gitbook.io/zelcore/recovering-wallet-file-after-a-wallet-crash.md).

# Recovering Wallet File After a Wallet Crash

{% hint style="warning" %}
**Always back up your wallet files and your address private keys for every wallet you hold assets in.**
{% endhint %}

### How to recover a wallet file

ZelCore creates backups of your wallet files at certain intervals to protect against wallet file corruption.

{% hint style="info" %}
What happened: The full node wallet was either force-closed by the user or experienced a fatal error and shut down. ZelCore creates a backup file of the wallet for these purposes, so the wallet file does not get corrupted.
{% endhint %}

1. Make sure your full node wallet is completely shut down/closed.
2. Navigate to your data directory:
   * &#x20;**Windows:** `C:\Users\YOURUSERNAME\AppData\Roaming\Zelcash`
   * &#x20;**MacOS:** `~/Library/Application Support/zelcash`
   * &#x20;**Linux:** `~/.zelcash/`
3. Grab all files with "wallet" in the name, including "wallet.datYOURUSERNAME", "wallet.datXXXBACKUP", and \*.bck files, move them to another folder in a safe location. There should be no wallet files in your data directory now.
4. Look for the backup wallet file that is the newest, and typically has the largest size.
5. Copy/paste the backup wallet file into your data directory, and rename it to "wallet.dat".
6. Launch ZelCore, then the full node wallet. ZelCore will show a message that it found an unencrypted wallet file. This is good, click "OK".
7. After syncing, see if your original balance is shown. If it is not, then your wallet file is one of the other backups. Delete the wallet file in the data directory, find the next backup wallet file, copy/paste into data directory, rename to "wallet.dat" and perform Step 6 again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://zel.gitbook.io/zelcore/recovering-wallet-file-after-a-wallet-crash.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.
