×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Bcm50 R3 how to delete cdr records
3

Bcm50 R3 how to delete cdr records

Bcm50 R3 how to delete cdr records

(OP)

Would someone know the linux command to delete all the cdr records?
I do have access to Linux using putty and nnsupport account.
Backing up these Bcm's takes longer and longer since we can't uncheck the call detail recording when doing a backup...

Thanks

RE: Bcm50 R3 how to delete cdr records

Do you want to remove all CDR or just certain records etc. I don't have the file and folder path at the moment but will try to get it tomorrow.

There is a neat command that will delete the CDR information on a yearly basis.

Firebird Scrambler

Nortel & Avaya Meridian 1 / Succession & BCM / Norstar Programmer

Website = http://somertel.com
linkedin

RE: Bcm50 R3 how to delete cdr records

Once you have logged into the BCM via SSH, Do the following

"su" and then the root password

"cd /var/nn/CDRDataFiles"

"ls -al"

"ls *.2029* | xargs rm -rf"

The last command deletes all records for the year 2029. Just press the arrow up key and change the year and press enter again.
Repeat the task to delete all the years of CDR data that you don't need.

Firebird Scrambler

Nortel & Avaya Meridian 1 / Succession & BCM / Norstar Programmer

Website = http://somertel.com
linkedin

RE: Bcm50 R3 how to delete cdr records

Remember to remove the " when copying the lines of data and the "ls -al" command can be run again at any time whilst in SSH to check what data is still present in that folder. You might want to do a full BCM backup prior to making the changes so that all the CDR data is saved within the backup as it can be restored if needed at a later date.

Once you have done the deletions, do a full backup and the backup size will be much smaller.

If you use the ZOC tool as I prefer this to PuTTY, then I have attached a script that might help.

Firebird Scrambler

Nortel & Avaya Meridian 1 / Succession & BCM / Norstar Programmer

Website = http://somertel.com
linkedin

RE: Bcm50 R3 how to delete cdr records

2
Morning Brian

I was given the details from a good friend of ours who knows Linux very well.

Here is an extract taken from the word doc guide I wrote a few years ago

############################################################################################

There were over 172200 entries in my BCM system. The last 4 years were my CDR data from when I first installed the system. My BCM system originally had those from the previous customer’s calling history! The same might also be with your database. Unix can't delete them with the normal utility as they are too numerate.

Let's say you have files from 2009? or 2010 you want to wipe? Unix is your friend. Because I only have recent logs now, my examples are for 2013, but just change the date for your scenario.

If you want to look for only the 2013 logs, then enter:

ls -al *.2013* <cr>

You will get a complete list for 2013. Try substituting the 2013 for 2009 etc. If you get a HUGE list, let's count them by using the command

ls -al *.2009* | wc -l
<cr>

1080 <-- you'll get a little number after a few seconds. "wc" is
"Word count" and "-l" means count lines. The "|" means it’s the 'pipe' the output of the first command to the next. This is a clever command to know? That's what makes Unix handy for complex tasks. Do not mix the pipe | up with a capital I or small letter-L. This is the vertical line, near a back-slash on a British keyboard.

Now, if you want to wipe those old darned logs? If they are large in number, the normal delete command "rm" won't do it. It barfs on the amount of input data. So, there's another way, piping the listing to another utility which does what it's told for everything piped to it.

As in the above scenario, let's wipe out the 2009 (or whatever) logs. ENSURE you are in the correct directory: pwd <cr>

/var/nn/CDRDataFiles <-- OK, if we didn't move around, then it’s safe to begin the deletions.

We remove the target files by selecting certain ones, and pushing them to a command to do it: The below will remove all files from the year 2009:

ls *.2009* | xargs rm -rf <cr>

It will take a few seconds.
Check to see if they're gone:

ls *.2009* <cr> <-- and you should get nothing back.

[root@DraytonBCM50V2 CDRDataFiles]# ls *.2009*
ls: *.2009*: No such file or directory

#####################################################################################

I hope this explains your question?.

Firebird Scrambler

Nortel & Avaya Meridian 1 / Succession & BCM / Norstar Programmer

Website = http://somertel.com
linkedin

RE: Bcm50 R3 how to delete cdr records

I used the rm command on my own system and found you need to use the -f option to force delete the files. Otherwise it asks for confirmation on every file. So I ran the following commands after making /var/nn/CDRDataFiles the working directory to delete all CDR records from all years other than 2018;

rm -f *.2015*
rm -f *.2016*
rm -f *.2017*

Now when I enter the ls command it only shows records for the year 2018.

I ran a backup before and after deleting the CDR records. After deleting the years 2015-2017 my backup size went from 5.99mb to 2.65mb. I am still able to see CDR records using the CDR utility, so it looks like all is working as it should.

Brian Cox
Georgia Telephone
http://Georgia-Telephone.com
http://www.linkedin.com/in/briancox1952

RE: Bcm50 R3 how to delete cdr records

(OP)
That worked, a star for both of you!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close