ViCiDial Database Backups

Discussions about new features or changes in existing features

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

ViCiDial Database Backups

Postby martinch » Wed May 17, 2023 9:35 am

Hey guys,

Had an idea for ViCiBox users and other users that do not have database redundancy on their clusters either via backup boxes or replica servers. Would you guys be interested in a ViCi feature that would allow you to take database snapshots via the admin panel and/or via cron? Doing this will allow you to have some redundancy in your setup if the worst should happen. You can also have database snapshots for other usercases as well such as pre-cleanup data for example.

So I did some work on it today and I have the feature there or there abouts and would like your feedback on it...is this something that you personally would make use of?

Here's a mockup of the page on the admin panel...obviously, these things are subject to change;

Image

And here is a snippet of the output if run manually on the CLI;

Image

Thank guys. :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: ViCiDial Database Backups

Postby RBecker » Thu May 18, 2023 10:30 pm

My DB would certainly like to know how it would perform with this kind of a script :P

Code: Select all
db1:/srv/mysql/data/asterisk # du -sh
439G    .
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: ViCiDial Database Backups

Postby martinch » Fri May 19, 2023 12:53 pm

RBecker wrote:My DB would certainly like to know how it would perform with this kind of a script :P

Code: Select all
db1:/srv/mysql/data/asterisk # du -sh
439G    .


Holy moly! :) Thank you for posting this though as it has prompted me to include fine tuning options...in your case...backups would need to incremental, fine tuned to include only the most important table/data to you and piped to an external share or device. I'll definitely include that. :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK

Re: ViCiDial Database Backups

Postby martinch » Fri May 26, 2023 6:48 am

Hey RBecker,

Based on your post...I added some new options;

Image

For large databases like that, I've added some helpful options;

  • Log the last 24 hours only.
  • Log the last week only.
  • Log the last month only.
  • Purge after backup.
  • Purge queries placed into a seperate file (to allow admins to review the integrity of the backup prior to purging on the database).
  • Log config tables only.
  • Log data tables only.

I think there's more to add but hasn't come to mind yet :)
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK


Return to Features

Who is online

Users browsing this forum: No registered users and 8 guests

cron