06-30-2025 03:47 AM
Hello everyone,
We have many Cisco 2960 and Cisco 9200 switches. When backing up their configurations via FTP to a file server, every time we make a change and issue the write memory command, a new backup file is created — because the backup process appends the current date and time to the filename. As a result, we end up with too many backup files for each switch.
However, I only need to keep the latest two backup files per switch.
Here’s what I want to achieve:
Scenario 1: When I issue the write memory command on a switch, it should automatically create a backup file with the current date and time in the filename and upload it to the FTP server.
Scenario 2: When I issue write memory a second time, it should again create a new backup file with the current timestamp and upload it.
Scenario 3: On the third and subsequent backups, it should delete the oldest backup file for that switch and keep only the latest two backups.
Important note: Please do not suggest creating separate folders per switch as a solution. That would be too complicated and difficult to manage in our environment.
Does anyone know of any software or configuration method that can achieve this behavior?
Best regards,
T. Jafarli
06-30-2025 04:14 AM
I've been using NetBox with a backup plugin wit Git. It pulls config from each device every 5 minutes and stores if it has differences.
06-30-2025 04:14 AM
@turgutjafarli wrote:
Scenario 1: When I issue the write memory command on a switch, it should automatically create a backup file with the current date and time in the filename and upload it to the FTP server.
archive
log config
logging enable
path tftp://A.B.C.D/$h-$t
write-memory
time-period 10080
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide