this post was submitted on 01 Sep 2023
118 points (98.4% liked)

Selfhosted

40347 readers
330 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

As with many others, I've recently needed to do some purging of media in Pict-rs. What I also discovered is that due to an issue with either Lemmy, Pict-rs, or my setup, at some point Pict-rs was not properly removing files from the file system on a purge, leaving about 20GB of media orphaned.

To combat this, I've updated LPP with some additional configuration options to do both direct "purge" of leftover media in Pict-rs not tied to "kept" posts and a forced "remove" of files on the file system that are not properly purged (if using local storage).

You can find all the new options at the GitHub link above.

As a reminder, LPP only removes posts/media older than a specified time if they have not been posted, marked read, voted on, commented on, had comments voted on, or saved by users on your instance.

top 5 comments
sorted by: hot top controversial new old
[–] russjr08@outpost.zeuslink.net 3 points 1 year ago

This should come in handy, thank you!

[–] veam@lemmy.world 3 points 1 year ago

Very nice job mr fender :)

[–] russjr08@outpost.zeuslink.net 2 points 1 year ago (1 children)

I have a follow-up question if you don't mind! You mentioned this:

To combat this, I’ve updated LPP with some additional configuration options to do both direct “purge” of leftover media in Pict-rs not tied to “kept” posts and a forced “remove” of files on the file system that are not properly purged (if using local storage).

Is there a specific setting to use this? For example, if I don't want to setup any aging post purging at the moment, but just want to do as you mentioned (removing any media that isn't tied to a post), which setting(s) would I use to accomplish this?

It looks like this might be done by just passing in a PICTRS_FOLDER directory, and then setting a high PURGE_OLDER_THAN_DAYS variable would do this if I understand right?

[–] fmstrat@lemmy.nowsci.com 2 points 1 year ago (1 children)

That wouldn't work, but I see what you're looking to do. Open an issue and I'll make a flag 😉

[–] russjr08@outpost.zeuslink.net 2 points 1 year ago

Can definitely do!