List:General Discussion« Previous MessageNext Message »
From:a.smith Date:May 23 2011 12:24pm
Subject:Re: Deleting of records older than a specific date & time
View as plain text  
Quoting Machiel Richards <machielr@stripped>:


>
>         We need to be able to delete all data from the 2 tables that is
> older than the start of yesterday.
>

Hi,

   I use this veryyyy simple script to purge data from a syslog DB:

#!/usr/local/bin/bash
/usr/local/bin/mysql -u syslog -pmypasswd -e 'DELETE FROM SystemEvents  
WHERE ReceivedAt < date_add(current_date, interval -60 day)' Syslog

maybe that is useful for you...?

cheers Andy.



Thread
Deleting of records older than a specific date & timeMachiel Richards23 May
  • Re: Deleting of records older than a specific date & timeJohn Daisley23 May
  • Re: Deleting of records older than a specific date & timea.smith23 May