05-03-2018 07:07 PM
As we all know when we have to do a manual backup we have to perform this command "configupload" to download the current config to server ftp per example. Well I would like to deply do the same but in a automatic way (Daily backup or weekly backup). Does someone know how to do this?
Thanks for your help
Solved! Go to Solution.
05-04-2018 02:59 AM - edited 05-04-2018 03:02 AM
one way will be to prepare simple scripts and run it via task scheduler or cron
second way is to schedule backup via BNA/CMCNE.
Locate it in Configure > Configuration > Schedule backup
05-04-2018 03:22 PM
Thanks for your answer
Well about the first opion. Has someone (or you) perfom this way? are there some example which could be helpful to share?
05-07-2018 02:30 AM - edited 05-07-2018 04:00 AM
time ago i've used simple script with MobaXterm, which remembered password for users.
But now i would perform following steps:
1.) Generate public/private keys for authentification.
To set up SSH public key authentication on a switch for incoming connections: 1. Generate a private/public key pair on a remote host (accept default directory and file name): username@remotehost> ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key \ (/users/home/username/.ssh/id_dsa): Enter passphrase (empty for no passphrase):pass phrase Enter same passphrase again: pass phrase Your identification has been saved in /users/home/username/.ssh/id_dsa. Your public key has been saved in \ /users/home/username/.ssh/id_dsa.pub. The key fingerprint is: 3 0:9f:ae:b6:7f:7e:55:e4:b2:7a:51:f0:95:44:5c:d1 \ username@host 2. Import the public key from the remote host to the local switch: switch:username> sshutil importpubkey Enter IP address:Remote host IP Address> Enter remote directory: ~username/.ssh Enter public key name(must have .pub suffix):id_dsa.pub Enter login name:username Password: public key is imported successfully.
2.) Create simple script
ssh email@example.com "configupload -p ftp ftp_ip,user,root_dir/config_name.cfg,ftp_password"
Note: If you have BNA/CMCNE it has build up FTP server so you may use that, if not you have to install FTP server somewhere.
3.) Setup cron job on linux machine to schedule backup of configs.
If you would like to user different user for config backup. You have to allow this user to use public/private key
sshutil allowuser username
05-07-2018 05:10 PM - edited 05-07-2018 05:42 PM
Thanks for the answer.
I have another question, per example if I decide to do the daily or weekly backup VIA BNA or INA, Where the files will be saved? Which folder?
Look the screen configuration
05-08-2018 04:52 AM
config backuped up via BNA is stored in postgres BNA/CMCNE database and its not stored as single file.
You may export config via Configuration File Manager...