Freshrss: Help: Delete old read articles from database to reduce size

Created on 20 Jun 2019  路  22Comments  路  Source: FreshRSS/FreshRSS

Hi,

Is there a way to delete/purge read articles from the database?

My "use case" is, that I want to reduce the size of the DB to save space and for optimization. The only option I found is to purge articles that are older than x, but that would also purge the unread articles.

Since I'm one of the users described in #2018 that uses "unread" to keep articles they want to read at a later point in time, I can't use the purge feature.

Additional question: If I would use purge, would that also purge favorites that are older than x? I don't want to try that with my live system and my test docker is down at the moment :) Otherwise that could be a workaround, mark all unread as favorites, purge and the mark them unread again.

Thank you!

Most helpful comment

Finally had a chance to check it.

Looks like it's working now, I found the wrong owner in the access rights and setting the archive criteria less months worked!

Perfect, thank you so much! Still love FreshRSS, absolutely the best reader!

All 22 comments

Hello,
Favourites and tagged entries are not purged:

https://github.com/FreshRSS/FreshRSS/blob/744a9e8cf00aef7dec0acfa5f90f0dcfa2ef8837/app/Models/EntryDAO.php#L612-L618

There is a PR in progress to add more features https://github.com/FreshRSS/FreshRSS/pull/2335 (I will try to complete the review/test this week-end)

Great, thank you very much for the quick reply.

So as a workaround at the moment my initial plan should work:

  1. Mark everything unread I want to keep as Favorites

  2. Purge articles older than 1/2/3/x months.

  3. Do database reduction

  4. If wanted switch Favorites back to unread

Very good, I'll try that over the weekend.

Thank you so much for the great work!!!

In the incoming PR, you can choose want you want to purge. It's more fine grained. I wrote it a couple of month ago so I don't remember every bits. But if I remember correctly, you can have different settings on feed level. To be confirmed.

This sounds awesome! Looking forward to giving it a test drive.

@KingKarlo please test #2335

I'll do. I just have to ask a silly question since I'm kind of a github newbie, how do I do that?

This message will help you: https://stackoverflow.com/a/30584951

Thank you, looks like I should have started earlier in my life with git :)

I'll try to figure out what to do and I'll test it if possible.

@KingKarlo I've just added configuration on category level as well.
Note that to be effective the purging system configuration must have one of the maximum option set (either by count or period or both)

Okay, reading helps, it was way easier than expected.

Looks like it's working for me, great! I say "looks" because I have some minor UI glitches, i.e. the single feeds don't show up on the main page, the total number of articles isn't displayed and the number of articles and DB size in the Archive setting doesn't show up. But going through the maintenance steps cuts the number of articles and DB size in half, just like expected. Perfect!

I really like the clear options "Never delete...", in particular the one with "unread". That makes very clear what's happening and what will be deleted.

Great, great, great!!!

@KingKarlo I've added back the number of articles and the db size back. I though it has no use. I was wrong.

I do not understand what you mean by:

the single feeds don't show up on the main page

Could you post a screenshot to help me understand what's wrong?

Yes, it reappeared. I think it's helpful since it's the only place where you can easily see the sice of the db (and if the cleanup worked).

Here are the two screenshots. I hope that makes it clearer, it's the main page, left column. With the dev version the total number of articles and the single feeds are missing.

Don't wonder too much about the high number of unread items, that was a test dump from my db where I set a lot of old articles to unread. Just checking if it was working also with a high number of articles.

image

image

Oh! I see. I've notice that too and I fixed it :)

Perfect!

I switched recently from another RSS setup to FreshRSS and I couldn't be happier.

Thank you so much for all your help!

Now you just need to be patient to see the changes landing on dev branch. Spread the world! :)

I'll do...both...trying to be patient and spread the word :)

@KingKarlo It is now merged in dev branch. There will be a call for testing before the next release. This should happen shortly. That would be nice if you could make some more tests.

Of course, happy to test it!

Okay, that's strange. It looks like it doesn't work like in the previous dev versions.

First of all the update wasn't working via the UI, there's a message like "OK! FreshRSS will be updated to the git version" followed by a red error box "Git error". Maybe something went wrong with my installation, but I was able to update via git from CLI.

The second thing is the stranger one. I used the same settings as in the dev branch, but now the database cleanup says "0 articles deleted"....and there should be plenty to clean up.

I might be just missing something obvious this time...

@KingKarlo If you got an update error, it is most likely due to a lack of write access for the Web user.
The date used to purge articles is the last time they have been seen online.

I was thinking about an access problem with the user too, but haven't figured out where it is. I'll go through the correct access rights to see if there's a mismatch.

"Online" like "They are still in the original RSS feed"? If I remember it correctly with the dev version if I set the "Maximum age to keep" to 1 year (in the end that doesn't matter) and tick all purge execptions, so favourites, labels and unreads never get deleted, it basically cleaned out all the read articles.

But I might remember that wrong, I'll have to check again :)

Thanks for your help!

Finally had a chance to check it.

Looks like it's working now, I found the wrong owner in the access rights and setting the archive criteria less months worked!

Perfect, thank you so much! Still love FreshRSS, absolutely the best reader!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eminphi picture eminphi  路  5Comments

Tealk picture Tealk  路  5Comments

Offerel picture Offerel  路  5Comments

javerous picture javerous  路  5Comments

Sp3r4z picture Sp3r4z  路  4Comments