We want to backup configuration to TFTP server via SNMPSET command.
I know there is scripting function that i can use for backup, but there is no function to save backup to TFTP server.
There are many devices that can save configuration to TFTP (such vendors like Extreme Networks, Huawei, D-Link, and others) via SNMP or via CLI.
If anybody help me with this, or this function can be integrate to SNMP instructions.
RouterOS does have FTP and TFTP server features. By default FTP server is running, TFTP must be configure manually.
I am not sure of doing as you described is possible but in general you can access ROS via FTP/TFTP and download/upload files you want.
Using scripts should be also helpful with
This is going to be difficult. You likely already noticed that RouterOS is a bit different from the other environments you mentioned.
In other systems the backup command usually has some destination outside the device, i.e. you “backup to tftp”.
In RouterOS, a backup is always to the local filesystem. Transferring the backup file to another device is considered a separate task.
(this is true both for the binary backup and for the export in text form)
You can transfer the backup via tftp but then the router is going to be the tftp server and you can fetch the file from somewhere else.
Not what you want.
There is no tool for “uploading” from the router either, so you cannot make a local backup and then send it to a remote tftp server.
As the basic building blocks are not there, the “next level” of getting it to work via SNMP using some form of scripting is even further out of reach.
You will need to setup an additional infrastructure for making your RouterOS backups, i.e. different from using SNMP and TFTP to a fixed server.
Methods you can consider:
doing an SSH from a central server to each router, issue a /export command there and receive the export via the SSH session, which should then be stored on the backup server (probably strip some first and last lines that are not relevant)
doing an SNMP set to issue a /export file=name command, then log out and transfer the file using FTP or TFTP from the central server to the router