# Accessing /data folder of persistent storage

**URL:** <https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681>\
**Category:** Spaces\
**Created:** [July 13, 2023, 10:54am UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681 "2023-07-13T10:54:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![indiaj27](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/indiaj27/32/4510_2.png) [@indiaj27](https://discuss.huggingface.co/u/indiaj27)\
**Post date:** [July 13, 2023, 10:54am UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/1 "2023-07-13T10:54:12Z")

</div>

Hi, I have a pretty dumb question. I set up persistent storage for one of my spaces and the docs said that this is stored on the “/data” folder.

How do I access this folder? How can I see what’s in it and save the data locally via Python?

Thanks,  
AJ

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [July 19, 2023, 2:40pm UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/2 "2023-07-19T14:40:32Z")

</div>

hi @indiaj27 ,

Currently, there is no storage/file management via UI. We will be adding this feature in the near future.  
If you’re using Gradio you could try to leverage the `gr.Files` to list and serve the files under a specific folder. Here is an example

```python
import gradio as gr
from pathlib import Path

DATA_PATH = Path("./") # Path("/data")
def get_storage():
    files = [
        {
            "orig_name": file.name,
            "name": file.resolve(),
            "size": file.stat().st_size,
            "data": None,
            "is_file": True,
        }
        for file in DATA_PATH.glob("**/*")
        if file.is_file()
    ]
    usage = sum([f['size'] for f in files])
    return files, f"{usage/(1024.0 ** 3):.3f}GB"

with gr.Blocks() as app:
    with gr.Row():
        with gr.Column():
            btn = gr.Button("Run")
        with gr.Column():
            files = gr.Files(label="Files")
            storage = gr.Text(label="Total Usage")
    btn.click(get_storage, inputs=None, outputs=[files, storage], postprocess=False)

# Files that you explicitly allow on allowed_paths 
app.launch(allowed_paths=[str(DATA_PATH)])

```

---

<div class="post-metadata">

**Author:** ![indiaj27](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/indiaj27/32/4510_2.png) [@indiaj27](https://discuss.huggingface.co/u/indiaj27)\
**Post date:** [July 19, 2023, 6:13pm UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/3 "2023-07-19T18:13:09Z")

</div>

Hi @radames! Thanks for replying 🙂

I was actually referring more to using Python to programatically access the files, rather than the UI, but that’s good to know for the future!

I’m using Argilla - would you happen to know how to access the files from Python in that case?

---

<div class="post-metadata">

**Author:** ![jerpint](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/jerpint/32/45025_2.png) [@jerpint](https://discuss.huggingface.co/u/jerpint)\
**Post date:** [October 25, 2023, 1:28pm UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/4 "2023-10-25T13:28:52Z")

</div>

Are there any updates to this? I would like to also access files in `/data` , my current use-case is logging all my app logs to a file for persistent logging and later access

The gradio solution implies that the file would be public? If that is the case that would not be good for my use-case, as I would like logs to remain private

---

<div class="post-metadata">

**Author:** ![digitalhub483](https://avatars.discourse-cdn.com/v4/letter/d/a3d4f5/32.png) [@digitalhub483](https://discuss.huggingface.co/u/digitalhub483)\
**Post date:** [February 13, 2026, 8:02am UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/5 "2026-02-13T08:02:25Z")

</div>

Any update on this? Does this in the paid space plan? i just want to store my images and json file

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [February 13, 2026, 10:19am UTC](https://discuss.huggingface.co/t/accessing-data-folder-of-persistent-storage/46681/6 "2026-02-13T10:19:45Z")

</div>

For that purpose, [Dataset Storage](https://huggingface.co/docs/hub/en/spaces-storage#dataset-storage) seems to be the recommended option nowadays.

Persistent Storage is in a rather unclear state…🤔

> [@Spaces Persistent Storage Upgrade Not Accessible](https://discuss.huggingface.co/t/spaces-persistent-storage-upgrade-not-accessible/171226/11):
>
> Hi @Minimartzz There’s a similar discussion [here](https://discuss.huggingface.co/t/persistent-storage-not-visible-in-org-space-after-payment-info-added/172396/3). Persistent storage isn’t available for new Spaces, but you can use [Dataset Storage](https://huggingface.co/docs/hub/en/spaces-storage#dataset-storage) instead.

> [@Urgent: Persistent storage (/data) suddenly unavailable — vote DB lost after restart (channelcorp/KO-TTS-Arena)](https://discuss.huggingface.co/t/urgent-persistent-storage-data-suddenly-unavailable-vote-db-lost-after-restart-channelcorp-ko-tts-arena/173082):
>
> Hi Hugging Face team and community, We’re experiencing a critical production incident on our Space where Persistent Storage (/data) suddenly became unavailable, and as a result our SQLite vote database appears to be lost. This Space is a Korean TTS Arena where users vote and compare models, so the vote history is essentially community-built data accumulated over time. Losing it is extremely serious for us. Space [https://huggingface.co/spaces/channelcorp/KO-TTS-Arena](https://huggingface.co/spaces/channelcorp/KO-TTS-Arena)What changed? As far as …
