To inogure this new section of the forum, i'm proposing to you the first version of a backup script wich permit you to change the default backup directory, directly export backup files on a ftp server and finally write log files (on cpu disk and ftp server) of backup actions.
The script is developed in php (i really suck with shell script language ...) so it will only work on OXE wich are running at least R5.1 (i hope , i developped it on R7.1)
I let you discover how to use it, for the begening just enter on the command line :
Code: Select all
[root@xa000001 root]# php super_bck -help
Code: Select all
usage: php super_bck BACKUP DESTINATION
Run the process backup for BACKUP into DESTINATION
Choice for BACKUP :
mao : backup of the Mao
mao-acc : backup of Mao, Voice guides and accounting
acc : backup of the accounting data
acd : backup of the ACD date (statistics) and configuration files
vg : backup of the voices guides
mao-dat : backup of the Mao data files
obstraf : backup of the Traffic observation files
cho-dat : backup of the Linux specific data
noe : backup of the 8&9 series customized files
ops : backup of OPS files *** NOT SUPPORTED YET ***
4635j : backup the 4635j data *** NOT SUPPORTED YET ***
eva : backup of the voicemail configuration *** NOT SUPPORTED YET ***
eva-msg : backup of the voicemail configuration and messages *** NOT SUPPORTED YET ***
Choice for DESTINATION :
local : to store the backup file on cpu disk in a personalised directory
ftp : to store the backup file on a ftp server
To customize the configuration (backup directory, ftp server ...) edit the script file
Author : Remy Vallereau / Contact : remy@vallereau.net / link : http://www.alcatelunleashed.com
[root@xa000001 root]#
As you see, i launched the script as root. It permit to laucnh the backup process without prompting for the swinst password. If you want to use mtcl account you will need to enter the swinst password on the command line.
To simplify the command, you can create an alias in the .bashrc file :
Code: Select all
alias super_bck='php super_bck'
The script is fully customizable. You need to edit the script file and modify some global variables :
Here is the variable your can modify :
Code: Select all
$BACKUP_DEF="/usr4/BACKUP/IMMED/"; // Where the backup files are stored by default
$BACKUP_DEF_OPS="/usr4/BACKUP/OPS/"; // Where the backup of the OPS are stored
$BACKUP_DIR="/usr4/BACKUP"; // Where you want to store the backup files
$FTP_SERVER="pc"; // Address of the ftp serveur. It could be a hostname or directly and Ip adress
$FTP_PORT="21"; // Port of the ftp server
$FTP_USER="bck"; // Login
$FTP_PASSWD="bck"; // Password
$PATH_LOG_FILE="/usr4/BACKUP/"; // The path where the log file is saved
I hope this will be helpfull !
Sorry for my english ....
Bye !