cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11890
Views
25
Helpful
14
Replies

Automatic Backup Nexus 9000

pablo.arcelcr
Level 1
Level 1

How can I create and schedule an automatic backup in a Nexus 9000 device?

 

Thanks

14 Replies 14

Francesco Molino
VIP Alumni
VIP Alumni
Hi

There is a feature called scheduler.
Here is a sample config I'm using on Nexus switches:

feature scheduler
scheduler logfile size 1024
scheduler job name BKP
copy running-config ftp://user:password@x.x.x.x/$(SWITCHNAME).txt vrf default
scheduler schedule name DAILY
job name BKP
time daily 23:30



Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

 Hey Francesco,

 

Question any way to hide username/pwd with your statement below? On IOS devices you have ip ftp username xxx and ip ftp password?

 

cheers

 

Alexander

 Hey Francesco,

 

Question any way to hide username/pwd with your statement below? On IOS devices you have ip ftp username yyy and ip ftp password?

 

cheers

 

Alexander

Hi

No, such configuration isn't available on nx-os. I'm sorry.

What you can do is using a python script to do so and user and password won't be visible under show run config.


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Thanks for the feedback, seems there is a bug in the nx-os, ftp://username:pwd@host/yyy the username and pwd doesn’t work but when just do the state without username/pwd and manually enter this works.

Cheers

 

Alexander

Sorry i forgot that in Nexus you were not and to give the user and password.

A dumb question: why not doing the other way around, I mean install a rancid and it will be charge to collect the backup instead of Nexus pushing its config.
With rancid you'll be able to get config from all your network devices

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Hello All,

 

How do we remove "feature scheduler"?  I accidently cut & Paste.  I want to remove all these lines beflow.

 

"###

scheduler logfile size 1024


scheduler job name 9k-dlc-02
copy running-config ftp://user:password@x.x.x.x/$(SWITCHNAME).txt vrf default
 show running-config

end-job

#########

 

Thanks

HenryTruong

 

Hey Henry,

Try no feature scheduler

Config should be removed 😊

Super helpful, but you missed one bit after "scheduler schedule name DAILY" - You must end the job before you can make a schedule.

 

#end-job

 

And then you can schedule it.

Hello,

 

Is automatic config backup wokring on N9K. I have configured below command but no luck, can someone advise.

feature scheduler
scheduler logfile size 1024
end

config terminal
scheduler aaa-authentication username *** password *****

end

config terminal
scheduler job name BKP
copy running-config ftp://@10.1.1.1/backup.txt vrf default

end

config terminal
scheduler schedule name CURRENT
time start 2019:07:24:13:57 repeat 1:0:0
job name BKP
end

 

I tried FTP Credential also

copy running-config ftp://admin:****@10.1.1.1/backup.txt vrf default

 

Thanks

Kamlesh

 

 

Hi Kamlesh,

If your problem is not solved yet, please try this:

 

conf t

feature schedule

schedule logfile size 1024

scheduler job name BKN

copy running-config ftp://USER:PASSWORD@ip_or_name_of_the_FTP_Server/directory/file.cfg vrf default

END

conf t

scheduler schedule name DAILY

job name BKN

time daily 22:00

END

 

Note: The directory, user and the password must pre-exist to the FTP Server.

 

Please let me know, whether it works.

 

regards

Motiar

Hi I'm having problems with this I'm using :

scheduler job name BACKUP_CONFIG
copy running-config scp://<username>:<password>@10.10.10.10/$<switchname>.txt vrf NET_MANAGE


and it fails:

Job Name : BACKUP_CONFIG Job Status: Failed (1)
Schedule Name : NIGHTLY_BACKUP User Name : admin
Completion time: Mon Aug 22 16:05:52 2022
--------------------------------- Job Output ---------------------------------
`copy running-config scp://<username>:<password>@10.10.10.10/$<switchname>.txt vrf NET_MANAGE`
Inbound-ReKey for 10.10.10.10:22
Permission denied, please try again.
Permission denied, please try again.
@10.10.10.10: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
lost connection

When I do it manually like : copy system:running-config scp: it works fine

 

thanks for your help 
Dan 

memgtdg
Level 1
Level 1

Hi,

I believe it fails because you cannot include the password as part of the scp string like you can with ftp. This is the accepted syntax:

scp: Enter URL "scp:[//[username@]server][/path]"

I have the same problem. I found a script to use on IOS switches but not able to find anything I can use for Nexus

Hello

Please see attached .


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card