Syed Jahanzaib – Personal Blog to Share Knowledge !

November 16, 2011

MySQL DB & HTML files Backup Script


backup using bashs cript

LAST UPDATED:  10-MARCH-2019

Following is a customized backup script [Tested with Ubuntu 12/16] to create backup of your mysql DB and HTML files in local storage & on cloud using DROPBOX (make sure you have dropbox running),

This script will EXCLUDE data in radacct and radacct_archive tables. It will only export table structure without data. to reduce database size, you can modify this function.

NOTE: Using S.S.D disk (or raid) are highly recommended as there are less chances of  media failure, and above all read/write rates is incredibly fast. Plus If you have configured RAID , then it will provide redundancy as well.

Modify the script as per your requirements …

  • I am using KANNEL as sms gateway & sendEmail app to send email via GMAIL.
  • It will add some logs in /var/log/syslog
  • It will make a copy of files in /root/Dropbox folder
  • It will take backup of RADIUS Database excluding radacct , only radacct structure will be exported (to save disk space by lower size of backup)
  • It will also check mysql Service & DB status, if it found inaccessible, it will send email
  • It will also delete files older than 20 days from /backup & root/Dropbox folder
  • It will check File size, if Less than 1 byte it will alert, modify it as required
  • all backups will be saved in /backup & /root/Dropbox folder [dropbox if exists]
  • In the end, It will send email and SMS with details
  • It will also upload the backup in your FTP server, I used filezilla FTP server (free version in local LAN)

As usually, like all other scripts of mine it contains lots of junk. Please be-aware that I sometimes modify this file as per network requirements, so you may see revisions in this file. This is just an sample dummy, you can add remove any function in this script as per your requirements 🙂 ~ zaib

Let’s Start …


First create temp folder and create script in it.

mkdir /temp
cd /temp
touch fullbackup.sh
chmod +x fullbackup.sh

Now open the file

nano /temp/fullbackup.sh

and paste the following code.

#!/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc
#set -x
# Version 1.1 / 10th January, 2014
# Last Modified / 10-MARCH-2019
# Syed Jahanzaib / Web: https://aacable.wordpress.com / Email: aacable@hotmail.com
# This script creates FULL Backup of MySQL DB (Radius) and MYSQL DBR related DATA files & copy it in local system / usb / FTP
# We can adjust it to do incremental basis backup too, but I based on my personnel experiences, I prefer to have FULL backup instead of incremental,
# Because you never know what you will going to need in case of disaster recovery
# Adjust below DATA fields accordingly. remove / add desired folders.
# Settings various VARIABLES for the script
clear
# Colors Config ... [[ JZ ... ]]
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"

# IF YOU HAVE FEDORA or CENTOS or new version of UBUNTU, Change the /var/www to /var/www/html/
# Following is only RADIUS HTML FILES, mysqldb is separate from this, will come later in the script with /usr/bin/mysqldump
TARGET="/var/www/html /sql_backup /etc/freeradius"
SAVEDIR_FULL="/backup"
DROPBOX="/root/Dropbox"
HOSTNAME=`hostname`
#MYSQL DETAILS
SRV="mysql"
SQLUSER="root"
SQLPASS="passwordhere"
export MYSQL_PWD=$SQLPASS
DB="radius"
SQL_ACCOUNTING_TABLE="radacct"
SQL_DIR="sql_backup"
CMD="mysql -u$SQLUSER --skip-column-names -s -e"

#SET DATE TIME
set $(date)
time=`date |awk '{print $4}'`
DT=`date +%d.%b.%Y_time_%H.%M`
DATE=$(date +%Y-%m-%d)
DT_HMS=$(date +'%H:%M:%S')
FULL_DATE=`date`
TODAY=$(date +"%Y-%m-%d")
TODAYYMD=`date +"%d-%b-%Y"`
#Get ip which have default route
IPADD=`ip route get 1 | awk '{print $NF;exit}'`
logger Backup of mysqldb / html SCRIPT has been started @ $DATE / $DT_HMS

# Adding OS level Details in email message
# disk we want to monitor, make sure to change this
DISK="/dev/mapper/Billing--vg-root"
# Get DB size in MB
MYSQLDBSIZE=`mysql -u$SQLUSER --skip-column-names -e "SELECT table_schema "$DB", sum(data_length + index_length)/1024/1024 FROM information_schema.TABLES WHERE table_schema='radius' GROUP BY table_schema;" | cut -f1 -d"." | sed 's/[^0-9]*//g'`
SESSIONS=`mysql -u$SQLUSER --skip-column-names -e "use radius; SELECT username FROM $SQL_ACCOUNTING_TABLE WHERE acctstoptime IS NULL;" |wc -l`
DISKTOT=`df -h $DISK |awk '{print $2}'| sed -n 2p`
DISKUSED=`df -h $DISK |awk '{print $3}'| sed -n 2p`
DISKAVA=`df -h $DISK |awk '{print $4}'| sed -n 2p`
DISKUSEPER=`df -h $DISK |awk '{print $5}'| sed -n 2p`
MEMTOT=`free -m |awk '{print $2}'| sed -n 2p`
MEMUSED=`free -m |awk '{print $3}'| sed -n 2p`
MEMAVA=`free -m |awk '{print $4}'| sed -n 2p`
MEMUSEDPER=`free -m | grep Mem | awk '{print $3/$2 * 100.0}'`
MEMAVAPER=`free -m | grep Mem | awk '{print $4/$2 * 100.0}'`

#Update script execution Time Stamp / specific to PAKRAD billing system made by jz
#$CMD "use $DB; insert into scripts_exec (script_name, lastupdate) VALUES(' fullbackup.sh','$TODAY $DT_HMS') on duplicate key update lastupdate='$TODAY $DT_HMS';"

#GMAIL Details
GMAILID="MYGMAILID@gmail.com"
GMAILPASS="GMAILPASS"
ADMINMAIL1="aacableAThotmail.com"
COMPANY="ZAIB"
SMTP="64.233.184.108:587"

# KANNEL SMS Gateway - Details if you want to send SMS
KHOST="10.0.0.1:13013"
KID="kannel"
KPASS="PASSWORDOFKANNEL"
CELL1="03333021909"
EMAILMSG="/tmp/mysql.backup.result.email.txt"
SMSMSG="/tmp/mysql.backup.result.sms.txt"
SRVDOWNEMAIL="/tmp/srvdownemail.txt"
DBDOWNEMAIL="/tmp/dbdownemail.txt"
SQL_FILE="$HOSTNAME.$DB.mysql.db.$DT.sql"
FINAL_TAR_FILE="$HOSTNAME.$DB.final.file.$DT.tgz"
#LOG FILE, IF REQUIRED
SYSLOG="/var/log/syslog"

> $EMAILMSG
> $SMSMSG
> $SRVDOWNEMAIL
> $DBDOWNEMAIL
> $SQL_FILE
> $FINAL_TAR_FILE

# START the BACKUP PROCESS ... #######
# Start counting start time
start_time=`date +%s`
echo "
Welcome ! This is mysql and html Backup Script,it wil backup following folders ...
$TARGET

It will EXCLUDE radacct & radacct_archive folder from the backup to ensure reduced file size of Backup.

Powered by JZ
"
# Checking if $SAVEDIR_FULL folder is previously present or not ...
{
if [ ! -d "$SAVEDIR_FULL" ]; then
echo "- $SAVEDIR_FULL folder not found, Creating it so all backup's should be placed there ... "
mkdir $SAVEDIR_FULL
else
echo "- $SAVEDIR_FULL folder is already present , so no need to create it, Proceeding further ... "
fi
}

# Checking if $SQL_DIR folder is previously present or not ...
{
if [ ! -d "/$SQL_DIR" ]; then
echo "- /$SQL_DIR folder not found, Creating it so MSQL EXPORT/DUMP backup should be placed there ... "
mkdir /$SQL_DIR
else
echo
echo "- /$SQL_DIR folder is already present , so no need to create it, Proceeding further ..."
fi
}

# Check if $SRV (in this case mysql) is running or not, if NOT, then exit the script
SRVSTATUS=`service $SRV status |grep running |wc -l`
if [ "$SRVSTATUS" -ne 1 ];
#if [ -z "$SRVSTATUS" ];
then
echo "- ALERT: $HOSTNAME - $IPADD - $SRV NOT RESPONDING CHECK - $DATE $DT .Exiting ..."
echo "- ALERT: $HOSTNAME - $IPADD - $SRV NOT RESPONDING CHECK - $DATE $DT .Exiting ..." >> $SYSLOG

# SRV down EMail BODY
echo "- ALERT:

- $HOSTNAME
- $IPADD
- $SRV not responding ***
- $DATE $DT

Exiting ..." > $SRVDOWNEMAIL
sendemail -t $email -u "ALERT: $HOSTNAME - $IPADD - $SRV NOT RESPONDING CHECK - $DATE $DT" -o tls=yes -s $SMTP -t $ADMINMAIL1 -xu $GMAILID -xp $GMAILPASS -f $GMAILID -o message-file=$SRVDOWNEMAIL -o message-content-type=text
exit 1
else
echo "- $SRV service is accessible OK. Proceeding further ..."
fi

# Check if $DB (in this case radius )is accessible or not, if NOT, then exit the script
RESULT=`$CMD "SHOW DATABASES LIKE '$DB'"`
if [ "$RESULT" != "$DB" ]; then
echo "- ALERT: $HOSTNAME - $IPADD - DB $DB not accessible/exists - $DATE $DT"
echo "- ALERT: $HOSTNAME - $IPADD - DB $DB not accessible/exists - $DATE $DT" >>$SYSLOG
echo "- ALERT: $HOSTNAME - $IPADD - DB $DB not accessible/exists - $DATE $DT" >>$DBDOWNEMAIL

# DB down EMail BODY
echo "- ALERT:

- $HOSTNAME
- $IPADD
- Service $SRV is OK BUT
- Database $DB not accessible/exists ***
- $DATE $DT

Exiting ..." > $DBDOWNEMAIL
sendemail -t $email -u "ALERT: $HOSTNAME - $IPADD - DB $DB not accessible/exists - $DATE $DT" -o tls=yes -s $SMTP -t $ADMINMAIL1 -xu $GMAILID -xp $GMAILPASS -f $GMAILID -o message-file=$DBDOWNEMAIL -o message-content-type=text
exit 1
else
echo "- $DB - database exist OK. Proceeding further ..."
fi

echo "Starting Mysql DUMP ... since its INNODB , therefore we are using --single-transaction=TRUE featre
Powered by Syed.Jahanzaib
"
#sleep 5

# Creating MYSQL dump of databases & ignore DATA inside some tables
/usr/bin/mysqldump -u$SQLUSER --single-transaction=TRUE --ignore-table={$DB.radacct,$DB} $DB > /$SQL_DIR/$SQL_FILE
#/usr/bin/mysqldump -u$SQLUSER --no-data $DB radacct >> /$SQL_DIR/$SQL_FILE
#/usr/bin/mysqldump -u$SQLUSER --no-data $DB radacct_archive >> /$SQL_DIR/$SQL_FILE

# Check mysql File Size, if its less than 1 byte, consider it invalid
SIZE=`ls -lh /$SQL_DIR/$SQL_FILE | awk '{print $5}'`
SIZEB=`ls -l /$SQL_DIR/$SQL_FILE | awk '{print $5}'`
{
if [ $SIZEB -lt 1 ]
then
echo "SQL file size is invalid"
echo "SQL file size is invalid" >> $SYSLOG
SQL_RESULT="INVALID"
else
echo "SQL file size is OK"
echo "SQL file size is OK" >> $SYSLOG
SQL_RESULT="OK"
fi
}

#echo sleeping 30 seconds
#sleep 30

# GZIP MYSQL D.B & all other files like html etco
# TAR GZIP (mysql)
echo " - TAR Compressing all Backup Folders to $SAVDIR_FULL ... "
tar cfzv $SAVEDIR_FULL/$FINAL_TAR_FILE $TARGET
# Deleting sql db from $SQL_DIR because its zipped with the above command already and now all data available in single file : )
{
if [ -d "/$SQL_DIR" ]; then
rm -fr /$SQL_DIR/*
fi
}
# Print END time
echo "
- Backup ended at $6-$2-$3 Time $time .
"
echo "- Backup completed to $SAVEDIR_FULL ...
"
echo "- Backup ended at $6-$2-$3 Time $time ...
"
end_time=`date +%s`

# Delete files older then 20 days
echo "- Deleting Older files than 20 Days from $SAVEDIR_FULL and $DROPBOX (if any) to save disk space ..."
{
if [ -d "$SAVEDIR_FULL" ]; then
find $SAVEDIR_FULL/* -mtime +10 -exec rm {} \;
fi
}

# Delete files older then 20 days
{
if [ -d "$DROPBOX" ]; then
echo "- DROPBOX $DROPBOX folder found, making backup file copy in $DROPBOX too ... "
cp $SAVEDIR_FULL/$FINAL_TAR_FILE $DROPBOX
echo "- Deleting Older files then 20 days from $DROPBOX, to save disk space ..."
find $DROPBOX -mtime +10 -exec rm {} \;
fi
}
# Delete duplicate backup files .sql and .tgz from current folder to avoid file duplication
if [ -f $SQL_FILE ]; then
echo "- Deleting $SQL_FILE to avoid duplication"
rm $SQL_FILE
fi
if [ -f $FINAL_TAR_FILE ]; then
echo "- Deleting $FINAL_TAR_FILE to avoid duplication"
rm $FINAL_TAR_FILE
fi

# Print Complete Timings
echo "- Backup script completion Time was `expr $end_time - $start_time` s. "

# CHECK FILE SIZE AND COMPARE, IF ITS LESS , THEN ALERT
SIZE=`ls -lh $SAVEDIR_FULL/$FINAL_TAR_FILE | awk '{print $5}'`
SIZEB=`ls -l $SAVEDIR_FULL/$FINAL_TAR_FILE | awk '{print $5}'`
{
if [ $SIZEB -lt 1 ]
then
echo "- Final tgz Backup file size is invalid"
echo "- Final tgz Backup file size is invalid" >> $SYSLOG
TGZ_RESULT="INVALID"
else
echo "- Final tgz Backup file size is OK"
echo "- Final tgz Backup file size is OK" >> $SYSLOG
TGZ_RESULT="OK"
fi
}

# List files created Today & TRIM its reulst
LIST=`ls -lh $SAVEDIR_FULL --time-style=+"%d-%b-%Y" |grep $TODAYYMD | awk '{print $5,$6,$7}' | column -t`

#Email File with all details
echo "Mysql/HTML Backup Info for

===============
NETWORK DETAILS:
===============
HOST: $HOSTNAME
IP: $IPADD

==========================
RADIUS SERVER MYSQL REPORT:
==========================
MYSQL 'RADIUS' DB SIZE = $MYSQLDBSIZE MB
RADIUS Online Users = $SESSIONS Users

====================
DIS / STORAGE REPORT:
====================
Total Disk Space = $DISKTOT
Total Disk Space Used = $DISKUSED
Total Disk Space Available = $DISKAVA
Total Disk Space = $DISKUSEPER

==============
MEMORY REPORT:
==============
Total RAM = $MEMTOT MB
Total RAM Used = $MEMUSED MB
Total RAM Available = $MEMAVA MB
Total RAM Used Percent = $MEMUSEDPER %
Total RAM Available Percent = $MEMAVAPER %

- List of files created in Today's Date [$TODAY]

$LIST

- SQL_RESULT = $SQL_RESULT
- TGZ_REULST = $TGZ_RESULT
- Target Folders = $TARGET
- FileName = $SAVEDIR_FULL/$FINAL_TAR_FILE
- Size = $SIZE
- Backup Time = `expr $end_time - $start_time` s.

$COMPANY
Powered by JZ" > $EMAILMSG

#SMS file with lesser details
echo "$HOSTNAME - Backup Info
SQL_RESULT = $SQL_RESULT
TGZ_RESULT = $TGZ_RESULT
FileName = $FINAL_TAR_FILE
Size = $SIZE
Bkp Time = `expr $end_time - $start_time` s.
$COMPANY
Powered by JZ" > $SMSMSG

# PRINT INFO SECTION #########
echo "- Job Log for:
"
# Print Fetched Information on Screen , for info to see
cat $EMAILMSG

# EMAIL SECTION ##############
# Make sure you install sendEMAIL tool and test it properly before using email section.
#SEND EMAIL Alert As well using sendEMAIL tool using GMAIL ADDRESS.
# If you want to send email , use below ...
echo " - Sending SMS/EMAIL ALERT ..."
#curl "http://$KHOST/cgi-bin/sendsms?username=$KID&password=$KPASS&to=$CELL2+$CELL3+$CELL4" -G --data-urlencode text@$SMSMSG
sendemail -t $email -u "$HOSTNAME - $IPADD - mySQL Backup - $DT / Size=$SIZE" -o tls=yes -s $SMTP -t $ADMINMAIL1 -xu $GMAILID -xp $GMAILPASS -f $GMAILID -o message-file=$EMAILMSG -o message-content-type=text

# Print Credits : )
echo "

- Syed Jahanzaib / aacable@hotmail.com / https://aacable.wordpress.com "
DATE=$(date +%Y-%m-%d)
DT_HMS=$(date +'%H:%M:%S')
# log entyr in /var/log/syslog
logger Backup of mysqldb / html have been end @ $DATE / $DT_HMS
#########################
# FTP SECTION
#########################
FTP_HOST='192.168.0.1'
FTP_USER='ftpuser'
FTP_PASSWORD='ftppass'
FTP_REMOTE_DIR='/linux'
cd $SAVEDIR_FULL
ftp -n $FTP_HOST <<EOF
quote USER $FTP_USER
quote PASS $FTP_PASSWORD
cd $FTP_REMOTE_DIR
prompt
mput $FINAL_TAR_FILE
quit
EOF


Now execute this script  & see if any error occurs

/temp/fullbackup.sh

 


HOWTO SCHEDULE THE SCRIPT TO RUN ON DAILY BASIS

To run this file on daily basis (at 00:00 hours),
Open terminal, (make sure you are logged in with the root user.
type

crontab -e

(if it asks for text editor, select nano ,)

Now paste following code …

@daily  /temp/fullbackup.sh  >/dev/null 2>&1  # Run Daily in night at 00:00 hours

or if you want to run it every 6th hours (and on 15th minute) use following

# Run backup at 4:30 am in morning
#30 00 * * * /temp/fullbackup.sh >/dev/null 2>&1

# Run backup at 15th minute every 6th hours
15 */6 * * * /temp/fullbackup.sh >/dev/null 2>&1

Save & Exit:

Now, based on above selection, cron job will run this command at selected scheduled timings and clear any memory cache


TIP: Remove files older than xx days

When you will implement this script, it will backup every day, and continue to do so, and its a good idea to remove backup files older then 1 month, to save disk space otherwise one day it will chew whole disk space 😀
You can add following in the same backup script at end, so that whenever it will execute backup script, it will delete older files too

echo Deleting Older files then 30 days, to save disk space
# echo Deleting Older files then 30 days, to save disk space  >> /var/log/fullbackup.log
find /backup/* -mtime +30 -exec rm {} \;

 > SCRIPT   EXECUTION   RESULT … [old sample result]

 

b2

> EMAIL   ALERT   EXECUTION … [13-dec-2017 live sample]

 

mail backup sample

> SMS   ALERT   EXECUTION … [old sample]

 

2016-05-29 05.32.34


Regard’s
Syed Jahanzaib

105 Comments »

  1. Really great, thanks from spain 😀

    Like

    Comment by kbzajunior — November 19, 2011 @ 2:44 AM

  2. AWSOME work boss!

    Like

    Comment by shohaib — November 25, 2011 @ 9:17 PM

  3. good work

    Like

    Comment by Shakir — November 27, 2011 @ 12:29 PM

  4. Bro As salamu Alaikum how r u doing.. hope u fine.. bro if i upgrade radius 3.8 to 3.9 will remove crack lcience automatically ? or i can upgarde doesnt mattter about licece.. pls reply

    Thanks
    Take care

    Like

    Comment by Tanz — December 4, 2011 @ 7:36 AM

    • I am not sure about it. I guess you can upgrade.
      How you have manage to get crack for 3.8?

      Like

      Comment by Pinochio~:) — December 4, 2011 @ 10:26 AM

    • bro, can u please give me crack version as well or provide me a link where i can download it.
      thanks,
      Nomi
      funwithnomi@yahoo.com

      Like

      Comment by nomi — November 21, 2012 @ 9:23 PM

    • Hello bro,
      Can I get the cracked version of RM 3.8. My email arjuneu@gmail.com

      Like

      Comment by Arjun Neupane — March 9, 2014 @ 7:04 PM

  5. Is’t possible to re-post or send a link of script above! Thanks.

    Like

    Comment by elabdula — March 20, 2012 @ 3:09 AM

  6. hello bro,
    can you send the script above please. my email id is : raazive2005@yahoo.com
    thanks
    raziv ferdous

    Like

    Comment by Ferdous A Ferdous — March 24, 2012 @ 11:29 AM

  7. Can you please send me script to on my e-mail: elvir75@yahoo.com. Thanks!!!

    Like

    Comment by elabdula — March 26, 2012 @ 1:35 AM

  8. Dear Syed bhai,
    Please send this mail to my email id contact@hansinindia.com

    Thanks

    Like

    Comment by hansin — May 5, 2012 @ 10:12 PM

  9. Dear Syed ,
    Please sent into my email agashi@hotmail.it

    Like

    Comment by Dana — May 19, 2012 @ 2:05 AM

  10. agashi@hotmail.it , do i need it just to do just the script rwx/chmod 755 and add at crontab or to do anything else ?
    i would be thankfull if i had any other information

    Like

    Comment by Albadi — May 21, 2012 @ 1:48 AM

  11. can anyone send me script to my email ? its removed mehdi.dbx att gmail dot com

    Like

    Comment by mehdi — May 28, 2012 @ 5:40 PM

  12. hello can i have the radius manager script please !

    this is my email :: iraq4h@gmail.com

    and thanks

    Like

    Comment by Khalid — May 31, 2012 @ 1:09 AM

  13. aslam-alikum..
    can you send me the script as well ..regards
    adilmalik77@gmail.com
    thanks

    Like

    Comment by adil — June 16, 2012 @ 3:27 AM

  14. Hi, kindly avail me of the script referenced above. endyaccess@yahoo.com. regards,

    Like

    Comment by Endy — June 26, 2012 @ 11:44 PM

  15. hi please can you send me the script alternetwifi@hotmail.com

    Like

    Comment by javier alarcon — July 23, 2012 @ 12:43 AM

  16. Selam,

    Did somebody get that sciprt ?

    Like

    Comment by Ed — August 30, 2012 @ 7:29 PM

  17. hello , Syed
    can you send the script above please. my email id is : abraham1201@hotmail.com
    thanks from venezuela.

    Like

    Comment by Abraham — September 10, 2012 @ 11:13 PM

  18. Hi can you send me the script? My email is peanutbutter.gun@gmail.com
    Thank you!

    Like

    Comment by Bob — September 11, 2012 @ 2:01 AM

  19. Please send me the script …. My email arjuneu@gmail.com

    Like

    Comment by Arjun Neupane — September 19, 2012 @ 7:20 AM

  20. plz plz plz plz plz send me on myeishvar@gmail.com

    Like

    Comment by myeishvar — September 28, 2012 @ 6:50 AM

  21. please could I have a copy of script
    Many thanks
    BTW excellent blog!!!
    david@v-satellite.com

    Like

    Comment by David — October 15, 2012 @ 8:47 PM

  22. arena-net@live.com plz

    Like

    Comment by Senca — October 21, 2012 @ 11:27 PM

  23. Hi sir can you please email me the radiusmanager backup script wan’t to use it in test environment.My email is lascel1@yahoo.com
    thanks in advance

    Like

    Comment by Lascel — October 22, 2012 @ 11:50 AM

    • Hello again sir
      I’m very new to the linux environment and would really like you to guide me in the right direction.I have received your mail with the backup script but has no clue as to where and how to add the script to my linux machine.Would really appreciate it iff you can email me again with the relevant information.
      Thanks
      Les

      Like

      Comment by Lascel — October 22, 2012 @ 5:45 PM

  24. Syed bhai,

    Please send me the link also hi_sharoff@hotmail.com

    thanks

    Like

    Comment by himanshu — November 19, 2012 @ 7:27 AM

  25. Dear Syed ,
    Please sent into my email Shah_742@yahoo.com

    Like

    Comment by Manzor — November 24, 2012 @ 12:35 PM

  26. Syed,

    Could you please send me some info for this? asmozre@gmail.com

    Thanks,

    DJ

    PS. Been reading your blog, you’ve got some wonderful info

    Like

    Comment by DJ — November 25, 2012 @ 9:44 AM

  27. Please sent me crack version or link of Radius Manager —
    email : lotus6699@gmail.com

    Like

    Comment by RAJ — November 25, 2012 @ 5:24 PM

    • Hi sir i tried many times to post a question on your blog but I don’t know what going out I can’t see any of my post maybe i’m doing error some where

      > >

      Like

      Comment by maxwellnina — November 26, 2012 @ 1:29 AM

    • no support for crack versions.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — November 27, 2012 @ 12:16 PM

    • WE CAN SHARE THE AMOUNT OF RADIUS MANAGER 4 for educational purpose those who interested contact me.
      lotus6699@gmail.com

      Like

      Comment by RAJ — December 18, 2012 @ 4:27 PM

  28. can you send me merisokanovic@hotmail.com pleaseeee

    Like

    Comment by meris — December 2, 2012 @ 5:01 PM

  29. Please send me the script …. My email selver.kryeziu@gmail.com

    Like

    Comment by selver — December 11, 2012 @ 2:40 AM

  30. aslam-alikum..
    can you send me the script as well ..regards
    jackobarca@gmail.com
    thanks

    Like

    Comment by jackobarca — January 25, 2013 @ 4:22 AM

  31. aslam-alikum…
    i am new person of ubuntu .now iam installing your guideness of dma softlab rm.but installing process i have some command problems please send my email me full details of commands please..please

    Like

    Comment by prasad — January 27, 2013 @ 10:15 AM

  32. Bhai As salamu Alaikum allah sy umeed karta hon k app khairyat sy hongay allah aap ko lambi umer de allah app ko or ap k gar walo ko khush rakhay manay aap k blog sy bohat kuch seekha hay..
    Bhai aap meje yeh script send kar de mere be khwaish k may es ko istemal karon thanks 2 u
    Regrad
    Mr.Rafiullah
    softmaster915@gmail.com

    Like

    Comment by rafiullah — February 5, 2013 @ 11:16 PM

  33. salam alaikom syed,
    please can you send me the script ?
    its.__.me@hotmail.com

    Like

    Comment by Hussein — February 23, 2013 @ 8:58 AM

  34. hello dear,
    can you send the script above please. my email id is : gentel2277@gmail.com
    thanks

    Like

    Comment by Ahmed — March 7, 2013 @ 5:10 AM

  35. Good day. Can you please email the backup script to riaan@griesels.za.net. I have to thank you for a GREAT informative blog!

    Like

    Comment by Riaan — March 24, 2013 @ 12:35 PM

  36. Can you please email the backup script to gentel2277@gmail.com
    thanks

    Like

    Comment by Ahmed — March 25, 2013 @ 3:41 PM

  37. Hello sir can you send me the script me on abid.kadiwala@gmail.com?

    Like

    Comment by Abidali Kadiwala — April 27, 2013 @ 11:24 PM

  38. Hi señor Sayed please could be possible to also have this script at m.fossua@gmail.com thanks a lot

    Like

    Comment by Marcel Fossua — May 26, 2013 @ 3:20 AM

  39. can you send me the script ? deltaelb@hotmail.com

    Like

    Comment by ALi — June 26, 2013 @ 1:05 AM

  40. Dear Aslam o Alikum to All.

    Koi bata sakhta he ke script kiss cheez ka tha.lagta he linux based script tha ek comment parhe jiss me chmod ke cmd use ke he…

    akhir ham se koi share karega he ye scrpt kiss cheez ka tha..

    thanks

    Liked by 1 person

    Comment by Rashdi Samoo — September 15, 2013 @ 10:13 PM

  41. Can i have the backup script too… please patrick at 100fil dot ca
    Thanks!

    Like

    Comment by caspat99 — October 9, 2013 @ 5:29 PM

  42. everything is working fine i just need the cracked or trail license here : ifran_xion@yahoo.com
    so please email me 🙂

    thank you.

    Like

    Comment by Ifran Xion — November 22, 2013 @ 12:07 PM

  43. hi
    Can i have the backup script please?
    Good work on installin RM.
    Thnx

    Like

    Comment by hello — December 28, 2013 @ 5:44 PM

  44. Hi sir can you please send me customization of radius manager look.wifiproducts@yahoo.com

    Like

    Comment by prasad — December 29, 2013 @ 7:52 PM

  45. Hi Bro;

    Please sent me backup script please. How would appreciate if you could also give brief information about’ll use.
    zekisanli31@gmail.com

    Like

    Comment by Zeki SANLI — January 6, 2014 @ 1:34 AM

  46. Hi Sir,

    where is the line to put email after file already backup sent to email as a copy too?

    Like

    Comment by arul — April 4, 2014 @ 12:30 PM

  47. Hi Syed, one questions.

    Because it gives this error

    root@debian7:/home/jc# dpkg -i libltdl3-dev_1.5.24-1ubuntu1_i386.deb
    (Reading database … 45236 files and directories currently installed.)
    Unpacking libltdl3-dev (from libltdl3-dev_1.5.24-1ubuntu1_i386.deb) …
    dpkg: error processing libltdl3-dev_1.5.24-1ubuntu1_i386.deb (–install):
    trying to overwrite ‘/usr/share/aclocal/ltdl.m4’, which is also in package libtool 1.5.26-5
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    libltdl3-dev_1.5.24-1ubuntu1_i386.deb
    root@debian7:/home/jc#

    Thansk

    S:O: Debian 7.5

    Note: All the installations are correct

    Like

    Comment by Juan Carlos — June 17, 2014 @ 11:50 PM

  48. Thanks Dear brother Jahanzaib.
    Excellent work.

    Like

    Comment by Hisham N Ali — December 31, 2014 @ 1:18 PM

  49. Hi Syed, good work, The backup run fine but with generating fullbackup.log File does, as I do the restore?

    Like

    Comment by Juan Carlos — February 1, 2015 @ 9:34 AM

  50. how can i take back of RM in centos

    Like

    Comment by Pawan Sharma — March 24, 2016 @ 9:12 AM

  51. I am having problem after restoring the backup,after my server crash.
    In new server Users login very slow and mysql using full cpu..(checked by top)

    Pls help..ranjitmandal85@yahoo.in

    Like

    Comment by Ranjit — August 15, 2016 @ 1:39 AM

  52. Hi
    Sql Dump Is not download proper in this Backup Script Version 1.

    Like

    Comment by Chirag — February 2, 2017 @ 6:20 PM

    • What problem you are getting?

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — February 3, 2017 @ 8:18 AM

      • Hi,

        I am getting backup through this Script but mysql dump is wrong. this mysql dump is restore the server than no thing update.

        Like

        Comment by Chirag — February 3, 2017 @ 1:50 PM

      • Please see how restores works. make sure you do necessary modifications before using the script.

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — February 3, 2017 @ 2:05 PM

  53. Which changes is require in this Script ?

    Like

    Comment by Chirag — February 3, 2017 @ 2:21 PM

  54. on radius manager DMA, showing current ip 0.0.0.0, please can u help me

    Like

    Comment by Naeem — March 15, 2017 @ 7:45 PM

    • any person who tell me what is problem, in DMA radius manager showing active user but current ip address showing 0.0.0.0

      Like

      Comment by Naeem — March 15, 2017 @ 7:47 PM

  55. Dear zaib bro please send me as well the script : adilmunsif40@gmail.com

    Like

    Comment by Adil — November 11, 2017 @ 5:05 PM

  56. Please, do you know how to import users using csv, or in batches rather than registering users one after the other. I have like 25,000 user to import? Please help

    Like

    Comment by olatunde — December 13, 2017 @ 9:22 PM

    • Well you have to create customized script that takes username / password from csv and create users in rm_users table along with radcheck tables as well.

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — December 15, 2017 @ 10:35 AM

      • When insering the password, what hashing method or type needs to be used?

        Like

        Comment by Olatunde — December 15, 2017 @ 11:55 AM

      • inserting where? if in mysql table then MD5

        Like

        Comment by Syed Jahanzaib / Pinochio~:) — December 15, 2017 @ 3:36 PM

      • pls can I get a sample script for inserting users in batches in csv to the radius manager tables? tunscolo2002@gmail.com

        Like

        Comment by tunscolo2002@gmail.com — January 1, 2018 @ 7:19 PM

      • this file you mean ?

        On 6 January 2018 at 19:20, Syed Jahanzaib Personal Blog to Share Knowledge ! wrote:

        > tunscolo2002@gmail.com commented: “pls can I get a sample script for > inserting users in batches in csv to the radius manager tables? > tunscolo2002@gmail.com” >

        Like

        Comment by Abdo Ghor — January 6, 2018 @ 11:33 PM

      • yes, this file.. That will enable radius manager admin to insert users in batches, using csv. God bless you as you help.

        Like

        Comment by tunscolo — January 8, 2018 @ 5:35 PM

  57. Alsalam Alikum …. thank you nice Job … where i can found the backup script to the USB drive and on the backup folder on root . thank you

    Like

    Comment by Abdo Ghor — December 15, 2017 @ 2:38 AM

  58. Alsalam Alukoom
    ============
    i’m going with backup script …
    step by step … i think 70% Okay applied …
    but not sure yet if the backup copied to USB and sent to my Gmail
    ===== when im test backup by line====
    /temp/fullbackup.sh
    have this
    ======================
    ======================
    Checking if USB Is mounted or not…
    USB is not mounted !!
    Mounting USB now…
    mount: mount point /usb does not exist
    /temp/fullbackup.sh: line 35: with: command not found
    Welcome ! This is Radius Manager Backup Script, It will take backup of RADIUS

    Database and FoldersFollowing …
    /var/www/html /sql_backup
    Backup started at 2017-Dec-15 Time 15:14:36 . . .

    Powered by Syed.Jahanzaib

    ********* /backup folder is already present , so no need to create it,

    Proceeding further . . .

    ********* sql_backup folder is already present , so no need to create it,

    Proceeding further . . .

    ********* Exporting MYSQL DUMP to sql_backup …

    ********* TAR – Compressing all Backup Folders to …

    cp: cannot stat `/backup/15.12.2017__time_15.14.__radius_backup.tgz’: No such file or directory
    /temp/fullbackup.sh: line 131: syntax error near unexpected token `)’
    /temp/fullbackup.sh: line 131: `available in single file : )’
    root@abdo:~#
    =====================
    =====================
    any edit 🙂
    thank you

    Like

    Comment by Abdo Ghor — December 15, 2017 @ 6:23 PM

  59. السلام عليكم و رحمة الله و بركاته
    —-
    Mr Syed :
    # is this error about the USB store ? if yes it not compatible ?
    # about the e-mail configurations it complete but till now can’t found e-mail in my box
    thank you

    Like

    Comment by Abdo Ghor — December 18, 2017 @ 4:35 PM

    • just edit the script where is
      TARGET=”/var/www/html /sql_backup”
      with
      TARGET=”/var/www /sql_backup”
      and will be fine

      Liked by 1 person

      Comment by alket — December 24, 2017 @ 4:05 AM

  60. thank you for reply
    still have one error :
    ===========
    /temp/fullbackup.sh: line 149: syntax error near unexpected token `)’
    /temp/fullbackup.sh: line 149: `all data available in single file : )’
    ==========
    how can we fix it .
    thank you

    Like

    Comment by Abdo Ghor — December 29, 2017 @ 4:50 PM

  61. السلام عليكم و رحمة الله و بركاته
    Al Salam Aliukom wa eahmat ALLAH wa barakatoh

    in firstly .. want to thank you for 🙂 this nice script and for all your doing helping us
    ==
    as you seen in this photo the script working well with some errors in lines 219 , 239 ….
    i edited this lines by add # in first each line …

    ====
    than as you see in this photo too
    no errors
    but the backup zipped file take size 17 MB before was 26 MB ..
    and in both i have not backup file in my e-mail inbox
    ===
    how you can help me brothers ?
    thank you

    Like

    Comment by Abdo Ghor — January 1, 2018 @ 4:07 AM

  62. Al Salam Aliukom wa eahmat ALLAH wa barakatoh

    in firstly .. want to thank you for 🙂 this nice script and for all your doing helping us
    ==
    as you seen in this photo the script working well with some errors in lines 219 , 239 ….
    i edited this lines by add # in first each line …


    ====
    than as you see in this photo too
    no errors
    but the backup zipped file take size 17 MB before was 26 MB ..
    and in both i have not backup file in my e-mail inbox
    ===

    how you can help me brothers ?
    thank you

    Like

    Comment by Abdo Ghor — January 1, 2018 @ 4:10 AM

  63. Hello brother, can you send this script to my mailbox: tunscolo2002@gmail.com

    Liked by 1 person

    Comment by tunscolo — January 10, 2018 @ 3:20 AM

  64. Can you also help me on how to import huge users from csv file to radius manager, how to insert them into rm_users and radcheck tables, and other tables if there is? God bless you as you do.

    Like

    Comment by tunscolo — January 10, 2018 @ 3:22 AM

    • its easy. make an bash script that read data (like username and password) from the csv or txt file, then run a loop and add those id/pass in the radcheck and user table. radius manager have many other fields as well so you may want to tweak it like expiration date etc etc

      Like

      Comment by Syed Jahanzaib / Pinochio~:) — January 10, 2018 @ 12:52 PM

  65. Email is tunscolo2002@gmail.com

    Like

    Comment by tunscolo — January 10, 2018 @ 3:23 AM

  66. […] MySQL DB & HTML files Backup Script […]

    Like

    Pingback by DMASOFTLAB Radius Manager: Install + Backup + Restore – Welcome To My Blog — July 16, 2019 @ 6:16 AM


RSS feed for comments on this post. TrackBack URI

Leave a comment