gcc484perl-5.22
Last change
on this file since 128fde4 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100755
|
File size:
683 bytes
|
Rev | Line | |
---|
[c5c522c] | 1 | #!/bin/bash |
---|
| 2 | SERVER=root@a.datux.nl |
---|
| 3 | SPAMUSER=psy |
---|
| 4 | |
---|
| 5 | echo "Dumping spamdatabase from $SERVER, user $SPAMUSER..." |
---|
| 6 | ssh $SERVER "dspam_2sql $SPAMUSER" > dump.sql || exit 1 |
---|
| 7 | |
---|
| 8 | rm global.sql* 2>/dev/null |
---|
| 9 | |
---|
| 10 | echo "begin;" >> global.sql |
---|
| 11 | echo "delete from dspam_preferences where uid=1;" >> global.sql |
---|
| 12 | echo "delete from dspam_signature_data where uid=1;" >> global.sql |
---|
| 13 | echo "delete from dspam_stats where uid=1;" >> global.sql |
---|
| 14 | echo "delete from dspam_token_data where uid=1;" >> global.sql |
---|
| 15 | |
---|
| 16 | sed 's/values([0-9]*,/values(1,/' dump.sql >> global.sql |
---|
| 17 | |
---|
| 18 | echo "commit;" >> global.sql |
---|
| 19 | |
---|
| 20 | gzip global.sql |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | rm dump.sql |
---|
| 24 | |
---|
| 25 | echo "Ok done, global.sql.gz is updated with filter of $SPAMUSER from server $SERVER !" |
---|
Note: See
TracBrowser
for help on using the repository browser.