There is a backup script in astercc scripts directory, you can use it to make a sechduled backup mission for your databases and directorys.
First you should make a directory for backup , I make it to /home/backup.
Copy the bakcup.sh and backup.conf to /home/backup
cp astercc/scripts/backup.sh astercc/scripts/backup.conf /home/backup
Then, configure the backup.conf:
#this name of server,just for mark; default is the hostname of this server
#local path of save the backup file, default is back script running path
#how many latest days backup file will be saved in local server
#when run bakcup shell,it will sent a mail to notify if set the mailto
#the backup notify mail to
#the backup notify mail from
if you want to send the backup file to a remote server by ftp, just configure the [ftp] segment
[ftp] #if set, will try to sent the backup file to the host by ftp
#directory name to save the database backup file in ftp home
#directory name to save the dir backup file in ftp home
#which database would be backup you want; format: databasename:user:password
#for astercc database
[dirlist] #which directory would be backup you want, the absolute path of directory and the basename of directory: /etc/asterisk:asterisk
#for asterisk etc
then we execute the ./backup.sh to test, after execute the backup.sh, execut “find” in /home/backup, could get likes following content:
If everything is ok , we should set a schedule backup mission with crontab.
execute “crontab -e” and add the following line :
0 0 * * * /home/backup/backup.sh >/dev/null 2>&1
it’s means that the /home/backup/backup.sh will execute at 00:00:00 every days, you can adjust the execute time for fit your request.