Learn how to create a backup of the current IMSVA configuration and save it to your FTP server.
The procedure below will make use of the Cron (time based job scheduler) to extract current IMSVA configuration and to run a script to transfer the configuration to your FTP server.
- SSH to the IMSVA server and login as "root".
- Run the following command to create the ftpshare directory:
mkdir -p /root/ftpshare
- Go to the directory:
- Create the script by running this command:
- Press the 'I' key to go to the inset mode.
- Copy the following script on the "Insert" mode:
# Put FTP server details and credentials here
# login to remote server
ftp -n $SERVER EOF
user $USERNAME $PASSWORD
put IMSVAConfigExport`date +\%Y\%m\%d`.dat
#removes the file from the directory
rm -f IMSVAConfigExport`date +\%Y\%m\%d`.dat
- Save the changes and quit by pressing the combination of keys in the order they appear:
- Add permission to execute the script. Run the following command:
chmod a+x /root/ftpshare/ftpscript.sh
- Place scripts needed on the Cron tab to schedule when to run:
- Go to the “Insert” mode by pressing the 'I' key.
- Add the following line at the end of all jobs:
0 5 * * * /opt/trend/imss/script/imp_exp.sh -e /root/ftpshare/IMSVAConfigExport$(date +\%Y\%m\%d.dat) /dev/null 2 &1
5 5 * * * /root/ftpshare/ftpscript.sh
- This will back up the configuration into the /root/ftpshare/ folder every day at 5:00 AM and send the config to the FTP server at 5:05AM. Save the changes and quit by pressing the combination of keys in the order they appear: