...
Download the script.
Code Block wget -O delete_records.pl https://raw.githubusercontent.com/4psa/voipnowtoolbox/master/delete_records.pl
Install the needed Perl libraries:
Code Block yum install perl-DBD-mysql perl-File-Copy-Recursive perl-File-Remove perl-DateTime perl-Archive-Tar perl-DBD-mysql
Edit the delete_records.pl script and adjust the following variables :
Code Block $disabled = 0 $older = 1 $archive_files = 1
When $disabled = 0, the script will delete the records. When $disabled = 1, it will only do a backup.
When $older = 1, the script will remove recordings older than this value (calculated in months) will be removed.
When $archive_files = 1, the scrip will perform a backup (both MySQL and files) in the /backup directory.Run the script.
Code Block perl delete_records.pl
As a result, recordings will get deleted from the database as well as from the disk.
Warning If you are not sure of what you are doing, it's recommended that you set archieve_files to 1, so that you have a backup in case something goes wrong.
Related articles
Content by Label | ||||
---|---|---|---|---|
|
...
|
...
...
|
...
|
...
|
...
|
...
hidden | true |
---|
...
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.