Update administration.md#194
Open
ChillyKitty wants to merge 3 commits intooxen-io:devfrom
Open
Conversation
Added more administration guidance and information.
jagerman
reviewed
Jun 21, 2023
| 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');" | ||
| ``` |
Member
There was a problem hiding this comment.
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.
Author
There was a problem hiding this comment.
I agree, was saying this in the Session SOGS group. I'll look into it.
jagerman
reviewed
Jun 21, 2023
Member
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added more administration guidance and information.