Created
October 27, 2025 17:14
-
-
Save lhns/cf7392ecbf2910e75bdda5ffa67be5c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # perms: ftp, read, policy, sensitive, write, test | |
| :local addr "" | |
| :local port "21" | |
| :local user "mikrotik" | |
| :local pass "" | |
| :local systemname [/system identity get name] | |
| :local time [/system clock get time] | |
| :local prefix ($systemname.".".[/system clock get date]."T".[:pick $time 0 2].[:pick $time 3 5].[:pick $time 6 8]) | |
| /system backup save name=$systemname | |
| /tool fetch mode=ftp address=$addr port=$port src-path="$systemname.backup" dst-path="$prefix.backup" upload=yes user=$user password=$pass | |
| /export file=$systemname | |
| /tool fetch mode=ftp address=$addr port=$port src-path="$systemname.rsc" dst-path="$prefix.rsc" upload=yes user=$user password=$pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment