# Archive

We will first integrate with IPFS and provide simple ways for creators to periodically backup all messages.

To archive messages, the creator should upload all messages to IPFS as a directory using the following format, where each `*.data` file contain a buffer of the hex-encoded message:

```
.  
├── message  
│ ├── 42740f20aed483b69701a55ab295a2ed.data  
│ └── 38650f20aed483b69701a55ab291b7f4.data  
```

After the directory is uploaded, the creator should get back an IPFS hash, of which they should add it to their GUN as below:

```
const user = Gun.user();  
user.put({  
	archive: {  
		ipfs: "CABAB_1Dt0FJsxqsu_J4TodNCbCGvtFf1Uys_3EgzOlTcg"  
	}  
});  
```

**Supporting other file protocol**

We plan to integrate with other file protocols for archives based on user demand. As long as the file protocol support directory uploads in the archive formats described above, it should be fairly trivial to integrate with such protocol.


---

# 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.zkitter.com/developers/data/archive.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.
