Sorry for the delay in replying, this wound up in my spam folder. On 17 May 2018 at 19:01, Philippe MARASSE <philippe.mara...@ch-poitiers.fr> wrote:
> > My token database is getting big (> 1,5 GB with < 5 users !) so I'm > looking for a way to shrink this mariadb database. > Wow, that does seem like a lot. You say "token database", is this a single database used by the entire self-hosted sync setup, or is it a database only for the tokenserver part? If the latter, I'm very surprised to see it growing that large. > As stated on this page > https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html > there's no documentation yet about pruning expired data > > If anyone has a clue, SQL example, etc. It would be appreciated. > There's a script for purging expired sync items here: https://github.com/mozilla-services/server-syncstorage/blob/master/syncstorage/scripts/purgettl.py And one for purging old node-assignment records here: https://github.com/mozilla-services/tokenserver/blob/master/tokenserver/scripts/purge_old_records.py In both cases, I believe you should be able to execute them using the `python -m` syntax, something like: ./local/bin/python -m tokenserver.scripts.purge_old_records ./local/bin/python -m syncstorage.scripts.purgettl Hope this helps! Ryan
_______________________________________________ Sync-dev mailing list Sync-dev@mozilla.org https://mail.mozilla.org/listinfo/sync-dev