Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated using 4PSA automated script

...

  1. Download the script.

    Code Block
    wget -O delete_records.pl https://raw.githubusercontent.com/4psa/voipnowtoolbox/master/delete_records.pl


  2. 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


  3. 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.
     
  4. Run the script. 

    Code Block
    perl delete_records.pl


  5. As a result, recordings will get deleted from the database as well as from the disk.

 

  1. 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.


 

Content by Label
showLabelsfalse
max5

...

showSpacefalse

...

...

cqllabel in ("

...

call","

...

recordings","disk","

...

space") and

...

hiddentrue

...

space = currentSpace()


Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.