Posted on April 30, 2021 12:41 pm
 |  Asked by Alic Antunez
 |  86 views
0
0
Print Friendly, PDF & Email
How can I automatically (every X min) backup the Arista configuration? Using a script.
0
Posted by Philippe Bureau
Answered on April 30, 2021 12:46 pm

Hello,

Can you provide a little more details?

Do you want to backup the configuration locally on the switch?

Do you want to export the configuration from the switch?

Do you want an external server so pull the configuration from the switch?

 

Thank you

0
Posted by Lokesh Charora
Answered on April 30, 2021 1:32 pm

Hello Alic,

You can use the "schedule" feature available on the switch CLI to backup configuration every X minutes.
Please note, Arista switches by default collect historic tech-support every hour (going back 100 Hours in time) in the flash:schedule/tech-support/ direcotry. Running configuration is part of this tech-support collection(unless specifically excluded).

If you want to explicitly collect the running-config, you can set-up a schedule job as below :

switch(config)#schedule Backup interval 60 max-log-files 10 command show running-config

The command above will collect the CLI output of "show running-config" every 60 minutes and will keep the last 10 collected outputs. You can check the status of schedule as :

#show schedule summary
Maximum concurrent jobs 1
Prepend host name to logfile: Yes
Name At time Last Interval Timeout Max Logfile Location Status
time (mins) (mins) log
files
----------------- ------------- ----------- -------------- -------------- ----------- --------------------------------- ------
backup now 08:58 60 30 10 flash:schedule/backup/ Success
tech-support now 08:08 60 30 100 flash:schedule/tech-support/ Success

If you are backing up the config on a remote server via a CLI command, you can use that CLI command with the schedule as well to repeat after every x minute.

Let me know if this answers your question.

Thanks
Lokesh

0
Posted by Kishore Sukumaran
Answered on May 5, 2021 8:56 am

Hello Alic,

Thanks for your question. If you are interested to backup the EOS config to a remote server, we have a EOS central article that explains how a switch can push its configuration to a remote server, either on demand or periodically. Please refer to this link - https://eos.arista.com/how-to-backup-eos-configs-to-a-remote-server/

The above link has some examples and also explains about -

  • Automating remote authentication using SSH keys
  • Pushing the startup config to the remote server periodically
  • Pushing the running config to the remote server on-demand

You can also modify the same cron job as mentioned in the above link to save the config locally on the device also.

Let me know if the above helped in answering your questions.

Thanks!

Kishore Sukumaran

Post your Answer

You must be logged in to post an answer.