Changeset 7310

Show
Ignore:
Timestamp:
12/06/08 06:07:17 (2 years ago)
Author:
mickecarlsson
Message:

Closes #3224 removes hard coded database name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/backup/bin/ampbackup.pl

    r7128 r7310  
    6363$User_Preferences{"ASTETCDIR"} = "/etc/asterisk"; 
    6464 
     65$User_Preferences{"CDRDBNAME"} = "asteriskcdrdb"; 
     66 
    6567$User_Preferences{"AMPPROVROOT"} = ""; 
    6668$User_Preferences{"AMPPROVEXCLUDE"} = ""; 
     
    114116# the WEB ROOT directory  
    115117$webroot = $User_Preferences{"AMPWEBROOT"}; 
    116  
    117 # Provisioning root(s) and exclude list, if phone configuratoins should be backed up 
     118# CDR database  
     119$cdrdatabase = $User_Preferences{"CDRDBNAME"}; 
     120 
     121# Provisioning root(s) and exclude list, if phone configurations should be backed up 
    118122# 
    119123$provroot = $User_Preferences{"AMPPROVROOT"}; 
     
    209213        if ( $Backup_CDR eq "yes" ){ 
    210214                system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/cdr.tar.gz $webroot/admin/cdr"); 
    211                 system ("mysqldump --add-drop-table -h $hostname -u $username -p$password --database asteriskcdrdb > /tmp/ampbackups.$Stamp/asteriskcdr.sql"); 
     215                system ("mysqldump --add-drop-table -h $hostname -u $username -p$password --database $cdrdatabase > /tmp/ampbackups.$Stamp/asteriskcdr.sql"); 
    212216        } 
    213217        if ( $Backup_FOP eq "yes" ){