wkuntz
March 6, 2025, 2:01pm
1
Currently our DEPOSITORY_DIR is not getting cleaned up. Before I script a cleanup routine, I was wondering if there was any built in functionality to do this.
Thanks,
Bill
Grant
March 7, 2025, 2:32pm
2
Hi @wkuntz ,
Thanks for your question! At this time, the DEPOSITORY_DIR
is not being cleared automatically and will continue to collect files until they are removed.
I’ve opened a GitHub issue for this. In the meantime, it seems necessary to write a script to clean this up on your end.
opened 02:21PM - 07 Mar 25 UTC
2 - Exporting Data
**Describe the bug**
When exporting a query or building an export for DwCA, Spec… ify deposits this file into the `DEPOSITORY_DIR` configured for the installation, configured in the `specify_settings.py` file.
https://github.com/specify/specify7/blob/eebbae4b587deb0d80967b68f65beeec92f5c547/specifyweb/settings/specify_settings.py#L75-L78
If Specify 7 is installed via Docker, you can enter into a container and find this by going to `/volumes/static-files/depository`, for example, on the host system ([here's where the dir is created](https://github.com/specify/specify7/blob/eebbae4b587deb0d80967b68f65beeec92f5c547/Dockerfile#L111) and [here's where it is set](https://github.com/specify/specify7/blob/eebbae4b587deb0d80967b68f65beeec92f5c547/Dockerfile#L127)):
```bash
$ docker exec -it specifycloud-herb-rbge-1 bash
```
Inside the container, you can see how much space is being used here:
```bash
specify@138cc69fa32c:/opt/specify7$ du -ch /volumes/static-files/depository/* | grep total$
818M total
```
Just for this instance, 818 MB of space is being used up by query result exports dating back to 2023!
**To Reproduce**
Steps to reproduce the behavior:
1. Navigate to the `DEPOSITORY_DIR` location on the container/system hosting Specify 7
2. See that there are many export files dating back as long as you have had this Specify instance
**Expected behavior**
There should be some way to automatically clear this out regularly, with a default option (7 days) and the possibility to configure this to any limit (30 days, 6 months, 1 year).
**Version**
This is happening in `v7.9.6.2` and `v7.10.0`, but has almost certainly been an issue since the system was introduced.
**Reported By**
Bill Kuntz at Florida Museum of Natural History, University of Florida on the [Speciforum](https://discourse.specifysoftware.org/t/depository-dir-cleanup/2403)
system
Closed
March 14, 2025, 2:33pm
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.