Giter Club home page Giter Club logo

Comments (17)

beeyev avatar beeyev commented on July 28, 2024 1

Hello guys,
Here is a fixed version. Could someone check it?

from mikrotik-routeros-automatic-backup-and-update.

blindrain avatar blindrain commented on July 28, 2024

I Tried to remedy this issue
by modifing lines 165-168 to :
:if ([/system/resource/get board-name]="x86") do={
:local deviceRbModel [/system resource get architecture-name];
:local deviceRbSerialNumber [/system resource get board-name];
:local deviceRbCurrentFw [/system resource get version];
:local deviceRbUpgradeFw [/system resource get version];
} else={
:local deviceRbModel [/system routerboard get model];
:local deviceRbSerialNumber [/system routerboard get serial-number];
:local deviceRbCurrentFw [/system routerboard get current-firmware];
:local deviceRbUpgradeFw [/system routerboard get upgrade-firmware];
};
Seems to correct it if you don't modify anything else.

Where I tried to Change Variable scriptMode on line 31 along with the fix above.
to be something along the lines. of
:if ([/system clock get date]~"/08/") do={
#place instructions here
:local scriptMode "osupdate";
} else={
#place instructions here
:local scriptMode "osnotify";
};
So that it only updates the patch version on the 8th day of the month. it fails at

[blindrain@Travis New] /system/resource> /system script/run BackupAndUpdate
syntax error (line 232 column 21) Which is line 221 on the existing script. I have a different modification that changes the line numbers.
:set scriptMode "backup";

More Details:
Here is the rest of my variables: and this is on ROS v. 7.1.1 x86

## Additional parameter if you set `scriptMode` to `osupdate` or `osnotify`
# Set `true` if you want the script to perform backup every time it's fired, whatever script mode is set.
:local forceBackup true;
## Backup encryption password, no encryption if no password.
:local backupPassword "****************"
## If true, passwords will be included in exported config.
:local sensetiveDataInConfig true;
## Update channel. Possible values: stable, long-term, testing, development
:local updateChannel "stable";
## Install only patch versions of RouterOS updates.
## Works only if you set scriptMode to "osupdate"
## Means that new update will be installed only if MAJOR and MINOR version numbers remained the same as currently installed RouterOS.
## Example: v6.43.6 => major.minor.PATCH
## Script will send information if new version is greater than just patch.
:local installOnlyPatchUpdates	true;

from mikrotik-routeros-automatic-backup-and-update.

blindrain avatar blindrain commented on July 28, 2024

I'm also Running in this Error.
Bkp&Upd: could not send email message (succeeded). Going to try it again in a while.

while an email test from the command line works fine

@beeyev Please Email me [email protected] for my full modified script to see if you can help me resolve my email issues. I will be testing this on 7.1.2 works without issue.

from mikrotik-routeros-automatic-backup-and-update.

Man-Bot avatar Man-Bot commented on July 28, 2024

@blindrain Try to change Identity and simplify it.

from mikrotik-routeros-automatic-backup-and-update.

adval40 avatar adval40 commented on July 28, 2024

I have the same issue OS 7.1.3 and 7.1.2
your script works on rb4011 /rb3011 /rb2011
but i have the same email error on a crs112 or RB952Ui
i can't find the solution
thanks in advance

ad adval40 [email protected]

from mikrotik-routeros-automatic-backup-and-update.

beeyev avatar beeyev commented on July 28, 2024

@adval40 Make sure that Identity (custom device name) on these devices does not contain any spaces or special characters.

from mikrotik-routeros-automatic-backup-and-update.

adval40 avatar adval40 commented on July 28, 2024

i use as identity "test"

on crs112 works it's now
but on the rb952 it's not working
an RB 962 doesnt works either

thanks in advance

from mikrotik-routeros-automatic-backup-and-update.

akha666 avatar akha666 commented on July 28, 2024

Does any one got the solution for this issue?
I have tried the script with VM.
Mikrotik VM x86 >> not works.
Mikrotik VM x86_64 >> works.

from mikrotik-routeros-automatic-backup-and-update.

beeyev avatar beeyev commented on July 28, 2024

Could you try to run the script manually and show logs with an error?
Run this command in console:

/system script run BackupAndUpdate;

from mikrotik-routeros-automatic-backup-and-update.

weitgmbh avatar weitgmbh commented on July 28, 2024

We're facing similar issues. On some devices it works, on others it doesn't. We have one client who uses the same model and naming convention on two sites. It works on one router, on the other one we're getting the following errors in the log:

Bkd&Upd: Could not send email message () Going to try again in a while.

5 minutes later:
Bkd&Upd: Could not send email message () For the second time

When trying to run it manually, with your advised command
/system script run BackupAndUpdate;
this is what we get:

/system script run BackupAndUpdate;
            channel: stable
  installed-version: 6.49.6
     latest-version: 6.49.6
             status: System is already up to date

Saving system configuration
Configuration backup saved
no such item

Maybe the last line helps in finding the issue.

from mikrotik-routeros-automatic-backup-and-update.

akha666 avatar akha666 commented on July 28, 2024

same here when run it manually.
BBISvkO

from mikrotik-routeros-automatic-backup-and-update.

beeyev avatar beeyev commented on July 28, 2024

I am trying to find this bug, to make it easier I need your help. Could someone who experience this problem export router's configuration and share it with me?
Use this command:

/export compact hide-sensitive terse file=backup.txt;

It will generate a new backup. You can send it to my email [email protected]

from mikrotik-routeros-automatic-backup-and-update.

akha666 avatar akha666 commented on July 28, 2024

I am trying to find this bug, to make it easier I need your help. Could someone who experience this problem export router's configuration and share it with me? Use this command:

/export compact hide-sensitive terse file=backup.txt;

It will generate a new backup. You can send it to my email

The backup has been sent . Kindly check your mail with subject "Mikrotik backup requested for x86 issue".
This backup from the MT fresh installed. No rules or firewall setting, only WAN enabled with DHCP client for internet access

from mikrotik-routeros-automatic-backup-and-update.

weitgmbh avatar weitgmbh commented on July 28, 2024

Is there any update on the issue? If you have a workaround, please share it. I'm happy to test.

from mikrotik-routeros-automatic-backup-and-update.

weitgmbh avatar weitgmbh commented on July 28, 2024

Many thanks, @beeyev.
The script works fine on both routers that have failed previously.

from mikrotik-routeros-automatic-backup-and-update.

beeyev avatar beeyev commented on July 28, 2024

Great, I will merge the changes and close the issue then.

from mikrotik-routeros-automatic-backup-and-update.

albandes avatar albandes commented on July 28, 2024

It's working OK, thank you very much!!

from mikrotik-routeros-automatic-backup-and-update.

Related Issues (20)

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.