File Housekeeping

I imagine that my CDR files and other misc temp files are getting rather large. My Backups are over 1/2 G.
Best way to clean up?

Hi.
Any temp files could be removed except the current day.
About the CDR data, there’s nothing to limit the storing time.
You can connect on the database and delete the older data from a specific date.

However, I will send a feature request to improve this case.
If we could set something to limit the storing time (1 month, 6 months, …Etc)

Thanks!
Connecting on the database:
Can you give me a little guidance as to name/location?

Thank you!

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.