[Spce-user] Question - db backup

Kevin Masse kmasse at questblue.com
Wed Apr 16 08:23:56 EDT 2014


Jorge the speed really depends on the size of the database.
The way to avoid breaking hard drives is by making sure your hardware choice is of high quality.  Example, 15K RPM SAS Drives are an excellent choice.  Since we moved to these drives in RAID we have not seen hardware failure in the drives.
The CDR Storage is based on your requirements.  If you need long term CDR you can always perform another function that removes and archives a certain history for recovery later and this will reduce the size of the backup.  
I have a question, when you say it slows down when you make a query are you speaking of the query inside the Sipwise Admin interface?  If so I would agree and feel it is best to move away from the Admin interface for these queries.  Create a MySQL function for this purpose and ready directly from the database.  It will be far faster than you are seeing now.

The fastest way to may your backup is the way I mentioned below.

I hope this helps.

Kevin


-----Original Message-----
From: Jorge Fresneda - Ibersontel [mailto:j.fresneda at ibersontel.com] 
Sent: Wednesday, April 16, 2014 8:00 AM
To: spce-user at lists.sipwise.com; Kevin Masse
Subject: Re: [Spce-user] Question - db backup

I need is to back up dayly, but I found that this breaks the hard drives shortly. So wondering if there is any way to make a copy of fast and effective security.

I would also like to know what the volume is advised to store CDR because when there are many lines of CDR, the database slows down a lot when you make a query.


Thank you,
regards
Jorge

El 16/04/2014 13:35, Kevin Masse escribió:
> Hello Jorge, to start with be sure you are getting a back up manually
>
> On the Primary Sipwise you should be running the following command.
>
> mysqldump -p --databases billing provisioning kamailio accounting 
> carrier ngcp sipstats > /tmp/backup.sql
>
> Next move this backup.sql backup file from your /tmp folder on your 
> primary Sipwise to your backup Sipwise server in the /tmp folder
> Next on your backup Sipwise server run the following command     mysql
> -p < /tmp/backup.sql
>
> At a minimum this will duplicate your current setup.
>
> Next to answer your question of how often and the most effective way.
> There are many different answers for this and some depends on your 
> financial situation.
> How often really depends on your usage of the Sipwise.  Do you care 
> about CDRs?  Do you make a lot of changes to the subscribers 
> hourly/daily?  If so you need to constantly have a working backup of 
> your Sipwise.  The most productive way is: MySQL Replication Utilities.
> I don't think this is the place to support the MySQL process but you 
> can resolve this with some extra hardware and workbench setting up 
> MySQL Replication.
>
> If you are going to do MySQL Replication it would be nice to document 
> it here for the users of the list.  Here is a youtube link to explain
> better: https://www.youtube.com/watch?v=yZJECIq5-Ac
>
> Remember, hardware will fail we just don't know when.  Mistakes will 
> also happen and we will not know when so backup is your best friend.
>
> Supporting clients is hard enough, supporting them when your entire 
> routing system is down is a daunting task so pick a good plan now 
> before you get too big.
>
> I hope this helps
>
> Kevin
>
>
>
> -----Original Message-----
> From: spce-user-bounces at lists.sipwise.com
> [mailto:spce-user-bounces at lists.sipwise.com] On Behalf Of Jorge 
> Fresneda
> - Ibersontel
> Sent: Wednesday, April 16, 2014 6:18 AM
> To: spce-user at lists.sipwise.com
> Subject: Re: [Spce-user] Question - db backup
>
>> Hello,
>>
>> What is the most effective way to have a backup of the database? Is 
>> it better to do a full backup every day? Is it better to use an 
>> incremental backup files. Bin?
>>
>> Thank you,
>> Regards
>> Jorge
>>
>>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user





More information about the Spce-user mailing list