Page 1 of 1

ViCiDial Database Backups

PostPosted: Wed May 17, 2023 9:35 am
by martinch
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. :)

Re: ViCiDial Database Backups

PostPosted: Thu May 18, 2023 10:30 pm
by RBecker
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    .

Re: ViCiDial Database Backups

PostPosted: Fri May 19, 2023 12:53 pm
by martinch
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. :)

Re: ViCiDial Database Backups

PostPosted: Fri May 26, 2023 6:48 am
by martinch
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 :)