Giter Club home page Giter Club logo

mikrotik-routeros-automatic-backup-and-update's People

Contributors

alexander-tebiev avatar beeyev avatar clorichel avatar dalemaunder avatar deniska-666 avatar peter-lamantia avatar tebiev avatar tkozybski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mikrotik-routeros-automatic-backup-and-update's Issues

update doesn't work

The script doesn't update the firmware. I receive the message "If you have not received second email in the next 5 minutes, then probably something went wrong." and I don't receive the second mail and the firmware is not updated.

Add upload backup via FTP/SFTP

Hi!
Could you add uploading file backup via FTP/SFTP protocol? It would required the file name was unique so I suggest to add pattern to the file name like yyyy-MM-dd or yyyy-MM-dd-hh-mm.

execute doesn't passing local variable

ros v7.1.3

From
:local backupFileConfig "$backupName.rsc";
To
:global backupFileConfig "$backupName.rsc";

From
:execute "/export compact show-sensitive terse file=$backupName";
To
:execute {/export compact show-sensitive terse file=$backupFileConfig;}

  • "~~~" seems doesn't execute
  • $backupName makes long-long-filename.rsc : )

Or, how about drop "execute" and "wait"?

Please kindly review.

Mikrotik model name.

This is not a script error but some of my Mikrotics have "model: RouterBOARD cAP L-2nD" set and that is the problem.
I solved it like this:
#: local deviceRbModel [/ system routerboard get model];
: local deviceRbModel "RBcAPL-2nD";

Script does not work on a CloudHostetRouter

every time I run it, I get the error "executing script BackupAndUpdate from winbox failed, please check it manually".
If I delete the marked lines, the script works again.

:if ($isSoftBased = false) do={
:set deviceRbModel [/system routerboard get model];
:set deviceRbSerialNumber [/system routerboard get serial-number];
:set deviceRbCurrentFw [/system routerboard get current-firmware];
:set deviceRbUpgradeFw [/system routerboard get upgrade-firmware];
};

input does not match any value of channel

error

input does not match any value of channel

Update channel. Possible values: current, bugfix

:local updateChannel "current";

Need add stable, testting,development, long term Possible values: stable, testting,development, long term

:local updateChannel "stable";


RouterBOARD 941-2nD
Current Firmware 6.43.8

Mikrotik 7.12 Breaking Changes

I think this script is great.

When the script updates 7.11.2 to 7.12 the script becomes broken because one of the commands has been renamed.

Looking at this https://forum.mikrotik.com/viewtopic.php?t=201345

It states:
email - rename "address" property to "server"

Therefore to fix the script find the section of script below

#Check proper email config
:if ([:len $emailAddress] = 0 or [:len [/tool e-mail get address]] = 0 or [:len [/tool e-mail get from]] = 0) do={
    :log error ("$SMP Email configuration is not correct, please check Tools -> Email. Script stopped.");
    :error "$SMP bye!";

change the word address (after get) to server

Apply the script.

When updating from 7.11.2 to 7.12 the script failed. The routerOS was updated but the routerboard firmware was not.

I hope this helps someone!

Script error for RouterOS 7.15

There was an error while running the script. The log shows: 'executing script BackupAndUpdate from winbox failed, please check it manually"

sensitive information in ROS v7

There is still an issue with the hide-sensitive option, now in 7.1 the export always hide sensitive information by default, you have to use show-sensitive parameter to export those options too, i have manually changed my script in the export section.

Not working on Mikrotik x86

Script not running on Mikrotik x86 .I think it is because /system routerboard command is empty on x86 (even no winbox menu). Or maybe somethong else...

After start in log view only the next line:

Bkp&Upd: script "Mikrotik RouterOS automatic backup & update" started.
Bkp&Upd: Script Mode: backup, forceBackup: false

Adding Public IP to email details

Hi how easy would it be to add the current Public IP address to the email that is sent out.

http://ifconfig.co/ip
gives the Public IP Address

Something like the below ??
:local fetchdata [/tool fetch url="http://ifconfig.co/ip" output=user]
:local extip ($fetchdata->"data")
:local extip [ :pick [ :tostr "$extip" ] 0 [ :find "$extip" "
" ] ]
"IP updated to $extip!"

Please add new mode

Please add new mode, example: osupdate over backup if there is an update
The system will backup only when there is an update and will be updated, as was the first version of the script


Прошу добавить новый режим, который будет работать так:
система сделает бэкап только когда есть обновление и обновится, как было в первых версиях скрипта

Subject to contain date

Firstly, thank you for your script!
This is not an issue.

Gmail conversation view was categorizing all the backups under the same subject as 1 email.

To bypass this I added/changed some code which I would like to share it here as it could be useful for someone who is searching the backups by date.

I added a new line:
:local devicedate [/system clock get date]

Then I edit,
From: :local mailSubject "$SMP Device - $deviceIdentityNameShort.";
To: :local mailSubject "$SMP Device - $deviceIdentityNameShort - $devicedate";

The final subject is now: Bkp&Upd: Device - - apr/26/2022 Backup was created.

Invalid Body..........

Hello
The script worked flawlessly until google removed the option to allow insecure apps option.
I put another smtp server but now I can't send the backup mail anymore:
Same error with both hotmail smtp and smtp2go smtp: invalid BODY
Help please..........

changes for ros 7.1 required

hi,

the current version does not work in ros 7.1

there seems to be an issue with sending an email. syntax changed?

thx!!

Suggestion: Disabling the "Auto backup before updating" feature.

Hello @beeyev.
Would it be possible to disable the "Auto backup before updating" feature?
I really don’t see the need for it if one is using the script often, like every second or third day.
If there are any problems with the new OS version, I can roll back to the previous version a few days back.
Thanks very much.
Clive.

Suggestion: Missed schedule backup time

Sometimes router goes offline and missed schedule backup time. So backup done next day at same as schedule and I lose backup for that day.
Is there any way to confirm backup if it is missed, so run backup script?

Comma in Identity

When in System -> Identity contains comma (eg. CCR1016, Office1) scrip hangs with message
Bkp&Upd: could not send email message (succeeded). Going to try it again in a while.

Perhaps an additional check or (which is easier!) а naming recommendation will help here.

Script error at email check for RouterOS 7.12.1

I get an error after RouterOS update in section: #Check proper email config
The expression [/tool e-mail get address] is not valid because of the "address" value
Look like is not longer valid value in that context. I changed to "user", but I am not sure if the meaning of values are similar.
Current RouterOS: 7.12.1
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.