this post was submitted on 18 Nov 2023
6 points (80.0% liked)

Selfhosted

40183 readers
1049 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

cross-posted from: https://lemm.ee/post/15339951

My Lemmy instance has reached 100% storage so I can no longer use it. Is there a safe way I can clear cache or make some more space available without upgrading the disk space? I set up the instance with the ansible script many months ago and migrating to object storage seems to be a decent amount of work I don't have to commit to currently.

I tried searching on the admin wiki (https://wiki.lemmyadmin.site) but I couldn't find anything

I can't switch to Object Storage just yet because I'm worried that since I have 0 space left there will be issues when trying to migrate so I need to make some space available and then make the switch to Object Storage

top 3 comments
sorted by: hot top controversial new old
[–] aodhsishaj@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

What's your filesystem? What is your storage setup currently? Can you get to a shell on the running OS?

You might want to boot to a live linux usb/disk/ISO mount your filesystem/drive that is full and delete your cached files from that.

Here's how to clear tables on a regular basis https://lemmy.world/post/207421?scrollToComments=true

Here's how to clear your cache in your postgres DB https://stackoverflow.com/questions/68816441/clearing-cache-in-postgresql

I would strongly suggest standing up your self hosted instance in a docker container if you haven't already

https://blog.colic.io/2023/07/07/self-hosting-lemmy-a-step-by-step-guide-with-docker-compose/

Also now might be a good idea to look at grabbing a cheap external drive and backing up to that as a worst case.

https://join-lemmy.org/docs/administration/backup_and_restore.html

[–] xnx@lemm.ee 2 points 1 year ago* (last edited 1 year ago) (1 children)

im running ubuntu on a vps. I can get a shell running. I don't see where in that thread it mentions how to clear the tables?

I set up Lemmy using the Ansible setup so it is in docker

I have backups automatically running every week.

[–] s38b35M5@lemmy.world 1 points 1 year ago

I believe you want to look at the activity table. I don't have an instance, but the linked thread mentions it.