Auto Fix DB with crontab

Results 1 to 7 of 7
  1. #1
    Banned Adriana is offline
    BannedRank
    Apr 2011 Join Date
    127Posts

    Auto Fix DB with crontab

    make a new file named
    fix.sh
    put this code there:
    Code:
    #!/bin/bash
    Directory=*
    
    #CONFIGURATIONS:
    	#Sleep Time:
    	Time=1
    
    
    for PIDS in $Directory
    do
    	OPEN="$PIDS" 
    		if [[ "$OPEN" != "fix.sh" && "$OPEN" != "dbtool" ]] 
    		then
    		sleep $Time
    		./dbtool -r -s $OPEN -d $OPEN
    		fi
    done
    Put the fix.sh and bdtool where your dbdata is on the server

    then run a cron job to fix them auto blushing:


  2. #2
    ORGULHO DE SER BRASILEIRO vinicius.edson is offline
    MemberRank
    Dec 2008 Join Date
    Recife, BrazilLocation
    312Posts

    Re: Auto Fix DB with crontab

    What this do? '-'

  3. #3
    Angelemu founder tbnanubis is offline
    MemberRank
    Mar 2011 Join Date
    Unicorn ForestLocation
    527Posts

    Re: Auto Fix DB with crontab

    It does manipulate your db while your server is running, it may damage them if they are not already. DBtool is supposed to be used to repair your db if you have problems, and not on a cron base..

  4. #4
    Robb rbb138 is offline
    MemberRank
    Jan 2009 Join Date
    London, EnglandLocation
    1,241Posts

    Re: Auto Fix DB with crontab

    Not a good idea.
    That is, unless you want random rows dissapearing.

    You dont wanna be messing with the database whilst the server is drawing and saving infomation to it.

  5. #5
    Proficient Member Souris is offline
    MemberRank
    Feb 2009 Join Date
    167Posts

    Re: Auto Fix DB with crontab

    As the other said before: not something to do. You don't want to rebuild the database whilst the server writes to it. At most you could do so each time the server is started.

    Don't fix what isn't broke, that's just asking for troubles.

  6. #6
    Don't Ask About Tideborn vixio_dv is offline
    MemberRank
    Feb 2010 Join Date
    UKLocation
    774Posts

    Re: Auto Fix DB with crontab

    lol, this will kill your database..

  7. #7
    Apprentice potteradm is offline
    MemberRank
    Dec 2009 Join Date
    17Posts

    Re: Auto Fix DB with crontab

    this is useless



Advertisement