Vicidial repair

All installation and configuration problems and questions

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

Vicidial repair

Postby pyke » Wed Nov 09, 2016 3:50 am

hi gain guys.... i just want to know on how to execute this repair automatically in a given time everyday.....

" mysqlcheck -u cron -p --repair --all-databases "

... and also steps on how to do it. thanks again guys for the help and more power to you

God bless!
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: Vicidial repair

Postby mflorell » Wed Nov 09, 2016 6:45 am

Just put that command in the crontab
http://www.computerhope.com/unix/ucrontab.htm
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Vicidial repair

Postby Noah » Fri Nov 11, 2016 12:54 pm

You should run a check repair and optimize often
One liner for cron that will check repair and optimize at whatever time you specifiy for the cron.

mysqlcheck -uxxx -pxxx -cs dbname && mysqlcheck -uxxx -pxxx -rs dbname mysqlcheck -uxxx -pxxx -os dbname

Then grab a backup of the db.
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
Noah
 
Posts: 90
Joined: Tue Feb 08, 2011 7:14 pm

Re: Vicidial repair

Postby pyke » Tue Nov 15, 2016 11:22 pm

thank you for the reply....

can i write directly this on crontab -e ...

01 9 * * * mysqlcheck -u cron -p'*****' --repair --all-databases

thanks again
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: Vicidial repair

Postby gequiros » Tue Nov 15, 2016 11:34 pm

I create an script for this:
This will CHECK DB
mysqlcheck -u root -pPASSWORD --auto-repair --check -e -o --optimize --all-databases


and this will generate a BackUP with the time as part of file name ( and will be compressed ):
mysqldump -u root -pPASSWORD --all-databases | xz -9 > DB_BackUp-`(date +"%m-%d-%Y")`.sql.xz

I may be wrong, but you should enforce the check and the backup of DB, always worth to be prepared for a DISASTER !!!
Vicibox / ISO

1 x DataBase
1 x Archive
1 x Web
Many dialers

www.Come2VoIP.com
Skype: Come2VoIP-USA
WhatsApp: +1-305-320-1786
gequiros
 
Posts: 145
Joined: Sat Oct 22, 2016 1:22 am
Location: Miami, FL

Re: Vicidial repair

Postby pyke » Wed Nov 16, 2016 5:17 am

is it okay to write that? or should i write it like this on crontab

01 9 * * * /usr/bin/mysqlcheck -u root -p'PASSWORD' --auto-repair --check -e -o --optimize --all-databases

or this .....

01 9 * * * mysqlcheck -u root -p'PASSWORD' --auto-repair --check -e -o --optimize --all-databases

and what is the syntax to back up the database?

thanks for the help.... i really really appreciate it
pyke
 
Posts: 25
Joined: Fri Nov 04, 2016 2:11 am

Re: Vicidial repair

Postby mflorell » Wed Nov 16, 2016 6:53 am

We do have a script to check tables in VICIdial :)

# /usr/share/astguiclient/AST_DB_check_tables.pl --help
allowed run time options:
[--quick] = run test in QUICK mode, may not catch all issues
[--email-list=test.com:test2.com] = send email results to these addresses
[--email-sender=vicidial] = sender for the email results
[--test] = test
[--quiet] = quiet
[--debug] = verbose debug messages
[--debugX] = extra verbose debug messages
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 123 guests