{"id":21838583,"url":"https://github.com/bazzline/mattermost_housekeeping","last_synced_at":"2025-04-14T10:34:54.034Z","repository":{"id":58703812,"uuid":"369133904","full_name":"bazzline/mattermost_housekeeping","owner":"bazzline","description":"Free as in freedom mattermost housekeeping script to delete data older than x days from your local sever","archived":false,"fork":false,"pushed_at":"2023-11-13T13:53:01.000Z","size":79,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T23:41:55.749Z","etag":null,"topics":["cleanu","cronjob","fileinfo","housekeeping","mattermost","mysql","posts","retention","systemd"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazzline.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-20T08:19:42.000Z","updated_at":"2025-03-06T10:25:35.000Z","dependencies_parsed_at":"2024-11-27T21:12:36.081Z","dependency_job_id":"38cd3fa0-6d78-4d73-a994-e9389560331c","html_url":"https://github.com/bazzline/mattermost_housekeeping","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazzline%2Fmattermost_housekeeping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazzline%2Fmattermost_housekeeping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazzline%2Fmattermost_housekeeping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazzline%2Fmattermost_housekeeping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazzline","download_url":"https://codeload.github.com/bazzline/mattermost_housekeeping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248863312,"owners_count":21173976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleanu","cronjob","fileinfo","housekeeping","mattermost","mysql","posts","retention","systemd"],"created_at":"2024-11-27T21:12:25.525Z","updated_at":"2025-04-14T10:34:54.008Z","avatar_url":"https://github.com/bazzline.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mattermost housekeeping script\n\nDeletes old entries in Post and FileInfo on MatterMost GPLv2.\n\n## General\n\nFree as in freedom mattermost housekeeping script.\n\nThe current change log can be found [here](CHANGELOG.md).\n\nThe current documentation can be found [here](documentation).\n\nThis script supports MySQL/MariaDB only right now. If you need something for postgresql, take a look to [mattermost-retention](https://github.com/aljazceru/mattermost-retention).\n\n## Setup\n\nPlease read the [installation](documentation/setup/install.md) docmentation.\n\nThe script comes with an [install](bin/install.sh)- and an [uninstall](bin/uninstall.sh) routine.\n\nAll configurable values are configured in `\u003cproject_path\u003e/data/local_configuration.sh`.\n\n## What\n\nThis is a full blown cronjob/systemd.service to cleanup the mattermost database tables `Posts` and `FileInfo`.\n\nEntries older than x days where removed. This includes the attachments on the disk.\n\n## Why\n\nI am using my private mattermost server to communicate with each other.\nA german saying is \"was interessiert mich mein geschwätz von Gestern\" (\"what do I care about my chatter from yesterday\"). Also a german word called \"Datenhygiene\" (\"data hygiene\") is important. Plus, as the administrator, I want to keep the system fast for daily use.\nBecause of that, I wanted an easy way to remove messages older than x days. There is no official configuration section in the open source version of mattermost, so I've written this little script.\n\nThe script removes entries older than `\u003cconfigured value\u003e` days from the database tables `Posts` and `FileInfo`.\nThe script also removes the deleted files from the filesystem.\n\nRight now, only mysql is supported.\nRight now, you have to duplicate the configuration values from your `/usr/share/webapps/mattermost/config/config.json`. Since the configuration is written in json and json is !fun in bash, we have to keep it that way.\n\nThanks to [matterclean](https://github.com/sinfallas/matterclean/blob/master/matterclean) and [rsyslog_mysql_housekeeping](https://github.com/bazzline/rsyslog_mysql_housekeeping).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazzline%2Fmattermost_housekeeping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazzline%2Fmattermost_housekeeping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazzline%2Fmattermost_housekeeping/lists"}