this post was submitted on 23 Jul 2023
12 points (92.9% liked)

Lemmy

12540 readers
5 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to [email protected].

founded 4 years ago
MODERATORS
 

I'm running a small instance just for myself and a friend. We basically use it to access the Lemmy fediverse.

I was under the impression that our instance would not download imagery that was not hosted on it but the pict-rs "files" directory ended up with 45 gig of data which ultimately filled up the VPS storage space.

Is there a command that I can automate to prune this regularly or does anyone have a solution?

top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago (1 children)

Sadly not yet. Hopefully this will be improved in the future.

However, this sounds like you used one of these follow everything bots, which is just a bad idea as it results in these kind of issues.

[–] [email protected] -1 points 1 year ago

I did but "all" is useless without it and having to use a separate website to discover communities just doesn't make sense.

I think at some point I will figure something out.

[–] [email protected] 5 points 1 year ago (1 children)

I just took a look at the repository for pict-rs and unfortunately nothing in the official docs about cleaning up images. Did you happen to use a bot to assist you in finding communities? If so this might be the reason. After two weeks of running, my image size is only 2.2mb. I should also ask you what the size of your database is. The activity table can get awfully big and very quickly.

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

Ah, I see. I hope some maintenance tools will be forthcoming.

[–] [email protected] 4 points 1 year ago (1 children)

Imagine if media in Lemmy was all hosted in a distributed network filesystem like Iroh, where instances only function as inserters and exit nodes for that media.

This way, smaller instances can have a smaller cache corresponding to the media that was actually needed by it (recently). And independent peers can help by participating in the distributed file-system network without running instances themselves.

[–] [email protected] 2 points 1 year ago

Woah, that seems really neat! What would be the cons to doing this (other than the implementation time and effort of course)?

[–] [email protected] 2 points 1 year ago

It would definitely be nice to have some image retention policy. If an image hasnt been accessed in say 6 months its probably safe to say I won’t care about it. And if need be it can pull it from the original server again.

[–] [email protected] 1 points 1 year ago

Can you just run a cronjob to delete files in that directory every day?

(Maybe there's a reason you can't do this, I don't know how Lemmy instance works)