From 754fe281b0cca23343913cfe5d01dc01951c412f Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 28 Oct 2023 20:19:58 +0200 Subject: [PATCH] Update doc/ADMIN.md Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> --- doc/ADMIN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 942bb7c..e72082c 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -19,14 +19,14 @@ You could consider cleaning up your local cache first as otherwise your backup w To check your space usage, on a command line run: -`$ sudo cd /var/www/glitchsoc/live && sudo -u glitchsoc RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media usage` +`$ sudo cd __INSTALL_DIR__/live && sudo -u __APP__ RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media usage` If your cache is too big to backup, you can run the following command to clean up Attachments (the first line). Substitute X by the number of days you want to keep, e.g. 1 day. All older images will be deleted but will be refetched from the original server if necessary. First dry-run to see how much space is freed up (without actually removing): -`$ sudo cd /var/www/glitchsoc/live && sudo -u glitchsoc RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media remove --days=X --dry-run` +`$ sudo cd __INSTALL_DIR__/live && sudo -u __APP__ RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media remove --days=X --dry-run` If all looks good commit the cleanup: -`$ sudo cd /var/www/glitchsoc/live && sudo -u glitchsoc RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media remove --days=X ` +`$ sudo cd __INSTALL_DIR__/live && sudo -u __APP__ RAILS_ENV=production PATH=/opt/rbenv/versions/glitchsoc/bin bin/tootctl media remove --days=X `