Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
e198f775
Commit
e198f775
authored
Jul 02, 2014
by
Gavin Bisesi
Browse files
Merge pull request #168 from woogerboy21/servatrice-shellmaint-scripts
DB Maint Scripts
parents
fb4a7b32
9ba74fee
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
e198f775
...
...
@@ -2,3 +2,4 @@ tags
build*
*.qm
.directory
mysql.cnf
servatrice/scripts/maint_replays
0 → 100644
View file @
e198f775
#!/bin/bash
# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD REPLAYS SHOULD BE SAVED UNTIL (EX: SCHEDULE ONCE A WEEK TO KEEP A WEEKS WORTH OF REPLAYS IN THE DB)
mysql
--defaults-file
=
./mysql.cnf
-h
localhost
-e
'truncate table servatrice.cockatrice_replays;truncate table servatrice.cockatrice_replays_access'
servatrice/scripts/maint_sessions
0 → 100644
View file @
e198f775
#!/bin/bash
# SCHEDULE WITH CRONTAB TO RUN ONCE A MONTH
mysql
--defaults-file
=
./mysql.cnf
-h
localhost
-e
"delete from servatrice.cockatrice_sessions where start_time < DATE_SUB(now(), INTERVAL 1 MONTH)"
servatrice/scripts/mysql.cnf.example
0 → 100644
View file @
e198f775
[client]
user={db_username}
password={db_password}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment