here is one of the script i have tried
Code: Select all
# # Created Jotne 2020 v1.0 # # Takes two different backup and send then to email # # backup.rsc readable backup # Certificates, the Dude and Usermanager are also NOT exported or backed up fully and should be backed up separately. Can be used to restore config to different routers # # backup.bin binary backup # Binary backup that can only be used to fully restored the same router. # :local email "email@example.com" /export file=backup :delay 2s /system backup save name=bin :delay 2s :local date [/system clock get date] :local time [/system clock get time] :local info [/system identity get name] :local serial [/system routerboard get serial-number] :local files "backup.rsc,bin.backup" /tool e-mail send to="$email" subject="Mikrotik: Backup $info $serial" file=$files body="Automatic Backup of $info $serial at $date $time." :delay 20s /file remove backup.rsc /file remove backup.bin :log info message="Backup router=$info serial=$serial ok"