-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update administration.md #194
base: dev
Are you sure you want to change the base?
Conversation
Added more administration guidance and information.
administration.md
Outdated
After getting the room id you can clear out messages stored on your server since this is not done automatically. In the example below our room id is 1 and messages older than 14 days are being deleted. | ||
``` | ||
sqlite3 /var/lib/session-open-group-server/sogs.db "DELETE FROM message_details WHERE room = 1 AND posted < strftime('%s', 'now', '-14 days');" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better query here would be this so that you don't have to worry about the ID values at all:
DELETE FROM message_details WHERE room = (SELECT id FROM rooms WHERE token = 'someroom') AND posted < strftime('%s', 'now', '-14 days');
However, in general, I'd prefer that we moved such functionality into the sogs
command-line tool as I'm rather wary of having people directly interact with the sqlite database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, was saying this in the Session SOGS group. I'll look into it.
Backup for a SOGS using postgresql instead of SQLite would need a separate dump of the database via:
alongside the tar file from the sqlite instructions. |
remove direct db queries
Added more administration guidance and information.