Alcatel Unleashed

Alcatel Voice & Data Community with forums, knowledge base and much more !
It is currently Thu Sep 09, 2010 2:31 pm

All times are UTC - 8 hours [ DST ]


*** [LATEST UPDATE]: JANUARY 2010
*** This board is now closed to new posts
*** Use it to search in the old threads,
*** but post in the new board
***
*** FOR ANY QUESTIONS, EMAIL: ADMIN@ALCATELUNLEASHED.COM



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Backup script
PostPosted: Wed Mar 26, 2008 9:23 am 
Offline

Joined: Tue Jun 05, 2007 4:59 am
Posts: 19
Location: Paris / France
Hello everybody !

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 :D , i developped it on R7.1)


I let you discover how to use it, for the begening just enter on the command line :


Code:
[root@xa000001 root]# php super_bck -help


It will display the help of the script with the description of the parameters :

Code:
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:
alias super_bck='php super_bck'


This will permit to launch the command super_bck with out the php prefix.


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:
$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


Warning : For the ftp serveur adress, you can directly write an Ip adress. If you want to use an url, you will need a dns server configured in netadmin or an entry in your hosts files (in /etc/hosts).


I hope this will be helpfull !

Sorry for my english ....

Bye !


Attachments:
File comment: The script file
super_bck.zip [2.21 KiB]
Downloaded 187 times

_________________
Sorry for my english .... :)
Top
 Profile E-mail  
 
 Post subject: Re: Backup script
PostPosted: Wed Mar 26, 2008 1:21 pm 
Offline
Alcatel Unleashed Certified Guru
User avatar

Joined: Thu Apr 19, 2007 8:20 am
Posts: 808
Location: In front of my PC
Turlupin wrote:
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.

No.
You can execute a backup as follows w/o the swinst password using a trick:
Code:
/usr/bin/rsh -l swinst localhost /DHS3bin/soft_install/bin/bck -save mao-acc 1>output.txt 2>&1

8)

_________________
Never give up!


Top
 Profile E-mail  
 
 Post subject: Re: Backup script
PostPosted: Wed Mar 26, 2008 9:28 pm 
Offline
Alcatel Unleashed Certified Guru
User avatar

Joined: Wed Sep 14, 2005 4:45 pm
Posts: 4009
Location: Peru
The lord has spoken!

_________________
Ignorance is not the problem, the problem is the one that doesn't want to learn

OTUC ACFE/ACSE R3.0/4.0/5.0
Genesys CIV 7.X & Developer


Top
 Profile  
 
 Post subject: Re: Backup script
PostPosted: Sat Mar 29, 2008 9:01 am 
Offline
Alcatel Unleashed Certified Guru
User avatar

Joined: Thu Feb 02, 2006 8:41 am
Posts: 1732
Location: Romania
And we all still feel shiver down our spines :lol:

_________________
Alcatel-Lucent Expert Business Partner System Engineer

Mail Address: tot3nkopf@alcatelunleashed.com


Top
 Profile E-mail  
 
 Post subject: Re: Backup script
PostPosted: Wed Apr 02, 2008 3:34 am 
Offline

Joined: Wed Aug 30, 2006 10:43 am
Posts: 566
Location: Europe, Poland
Hello,
keep your pants on. :lol:

because if running 4.3 BSD also called a Ux Release you need to use:
Code:
/chusr/bin/rsh localhost -l swinst /DHS3bin/soft_install/bin/bck -save mao-account-ctree


Note, that the -l swinst and localhost has also changed positions.

Possible options are:
mao-account-ctree
mao
mao-ctree
account
account-ctree
mao-dat
account-dat
mao-dat-ctree
account-dat-ctree
vguides

_________________
--
skype:krzysie_d


Top
 Profile E-mail  
 
 Post subject: Re: Backup script
PostPosted: Thu Nov 19, 2009 10:41 pm 
Offline

Joined: Wed Oct 01, 2008 10:32 pm
Posts: 1
Hi Guys,

One of the other options for this one is:

Code:
/usr/bin/rsh -l swinst localhost /DHS3bin/soft_install/bin/bck -save ops 1>$
echo -e " >> \c "


which dumps the OPS files to /usr4/BACKUP/OPS

Has anyone had any luck with dumping 4645 or linux data with this method?


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

{ ASACP_CREDITS } ©Alcatel Unleashed 2004, 2005, 2006, 2007
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
It is OK to link to this forum. It is NOT OK to copy its content to your own website.
Creative Commons License
AlcatelUnleashed by AlcatelUnleashed is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.