File Housekeeping

Sure!

# fwconsole mysql
Connecting to the Database…Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4164
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> delete from asteriskcdrdb.cdr where calldate < now() - interval 3 MONTH;
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye

delete from asteriskcdrdb.cdr where calldate < now() - interval 3 MONTH;
You may set delete from asteriskcdrdb.cdr where calldate < now() - interval 6 MONTH;
You will keep the 6 last months.

Please. Do forget to save your database before to launch this kind of request :slight_smile:

1 Like