Netzgemeinde Hubzilla
Anmelden
Registrieren
Netzgemeinde Hubzilla
Anmelden
Registrieren
System Apps
Fehler melden
Hilfe
QRator
Sprache
Suche
Verzeichnis
Zufälliger Kanal
2025-02-11 11:48:24
Profil ansehen
Hubzilla Support Forum
adminsforum@hubzilla.org
Hiker
schrieb den folgenden
Beitrag
Tue, 11 Feb 2025 11:48:34 +0100
Are there any tools to maintain the database? It is getting bigger and bigger...
3
Der Pepe (Hubzilla) ⁂ ⚝
Alfred Bühler
Alexander Goeres
Link zur Quelle
show all
6 comments
2025-02-11 12:28:14
Profil ansehen
Scott M. Stolz
scott@loves.tech
Does "Expiration period in days for imported (grid/network) content" in /admin/site do what I think it does? Does it delete imported posts older than
x
number of days?
If so, that might be a useful setting.
1
Der Pepe (Hubzilla) ⁂ ⚝
Link zur Quelle
2025-02-11 12:44:15
Profil ansehen
Der Pepe (Hubzilla) ⁂ ⚝
pepecyb@hub.hubzilla.hu
@
Hiker
@
Scott M. Stolz
For example, I entered 14 days there (because older imported (!) Posts are rarely accessed anyway) and I have a fairly stable database size, which now mainly only grows with my own content and that of the users of my hub.
2
Scott M. Stolz
Alfred Bühler
Link zur Quelle
2025-02-11 13:12:30
Profil ansehen
Harald Eilertsen
harald@hub.volse.no
@
Hiker
Which DB engine? Note that databases will normally not shrink their storage even when purging records, but they provide tools for reclaiming storage (essentially copying the data to new files, but without the gaps in the original data files.) See the docs for your database for how to do that.
1
Scott M. Stolz
Link zur Quelle
2025-02-11 13:31:09
Profil ansehen
Mark Nowiasz
buckaroo@hub.netzgemeinde.eu
If you use MySQL (including all the different flavours, like mariadb, percona, whatever) you can try running
mysqloptimize -v -A
. This is a safe operation, the database won't go offline. But it could take some time, I usually do this once a week, and it takes at my site (140 GB DB) about 1h, so it's wise running it in a tmux/screen session. But you need some addtional disk space to perform this, so if you are very low on disk space this might not work.
3
Harald Eilertsen
Alexander Goeres
Scott M. Stolz
Link zur Quelle
2025-02-11 19:28:58
Profil ansehen
Hiker
hiker@fedhub.ch
I thought that Hubzilla has own tools to optimize the database - how long eg posts are store before deleted.
Link zur Quelle
2025-02-11 19:36:41
Profil ansehen
Harald Eilertsen
harald@hub.volse.no
@
Hiker
Those are two different things. Hubzilla will delete items that have not been interacted with after a certain (configurable) time. However, that may not reclaim the space used by the database. The database handles it's resources and how much storage space it needs.
Link zur Quelle
Konversationsmerkmale
Lädt...
Konversationsmerkmale
Lädt...
Anmelden
E-Mail oder Kennung
Kennwort
Angaben speichern
Anmelden
Registrieren
Zurücksetzen des Kennworts
Entfernte Authentifizierung