Automate ".backup" files?

General discussion of anything Unimus
thobias
Posts: 19
Joined: Mon Aug 08, 2016 11:19 am

Thu Nov 29, 2018 11:43 am

What about when you have different interfaces or something dynamic matching a fw-rule?
Lets say I need to restore a Hex that uses a USB-LTE-modem, if I do not have the modem plugged in when doing /import it will fail with "input does not match any value of interface" because "LTE1" interface do not exist yet.
User avatar
Tomas
Posts: 743
Joined: Sat Jun 25, 2016 12:33 pm

Thu Nov 29, 2018 12:19 pm

Few possibilities here:
1) if the new device is supposed to have the LTE modem even after restore - simply plug it in before import
2) if the new device is not supposed to have LTE, you can just search the config for "lte1" and remove the lines referencing it
3) if the new device is supposed to have LTE, but you can't plug it in now, you can search for "lte1" lines, and cut them out
after the device is put in place and LTE reconnected, just paste those remaining lines into the CLI

If you want to completely automate option 3, you can put those lines into a file.
Create a scheduled script which will run on next boot that will import that file.
After that the script should delete the file, and delete the schedule.
Of course, connect the LTE modem before the boot.
thobias
Posts: 19
Joined: Mon Aug 08, 2016 11:19 am

Thu Nov 29, 2018 3:57 pm

3 would be the option then, I just need to be more careful when restoring config. Or maybe send a feature request to Mikrotik to be able to "/import config.rsc force=yes" to accept config on things that do not exist yet.
JAz
Posts: 42
Joined: Thu Apr 26, 2018 11:06 pm

Thu Aug 29, 2019 5:20 am

Hey now,
Bit of an old thread but relevant nonetheless.

I understand all the comments and arguments laid out so far Tomas but still I'd like the ability to take a binary blob backups (.backup).

Not for the reasons given so far. I want it because I want to automate updating Mikrotik packages and firmwares.
If an update goes "sideways", I can use the .backup file to restore - with credentials, certificates, etc.
This is of course back onto the same hardware so there should be no issues or concerns.

I don't necessarily need it as part of the routine/nightly automated backups but I DO need to be able to do it from the scripts (Mass config push).
I mean I can TAKE the .backup now, I just don't know how I'd retrieve it to Unimus.

I thought about emailing the backup but that is messy. If a smtp server breaks, changes, malfunctions at the time, whatever, I have no blob. And since this is infrequently used, more chance something goes wrong and is unnoticed.

No, I need a way to have Unimus either take the .backup for me (on demand) or a way to have Unimus simply retrieve a file from the 'tik filesystem (on demand).

Thoughts?

Please. Thanks.
J.
User avatar
Tomas
Posts: 743
Joined: Sat Jun 25, 2016 12:33 pm

Thu Aug 29, 2019 7:07 am

JAz wrote:
Thu Aug 29, 2019 5:20 am
I need a way to have Unimus either take the .backup for me (on demand) or a way to have Unimus simply retrieve a file from the 'tik filesystem (on demand).
In Unimus 2.0.0, we are adding an API endpoint for pushing backups into Unimus.
This endpoint will support binary backups (as well as text backups of course).

You will be able to use the integrated MikroTik "fetch" tool to push a .backup file into Unimus from a Mass Config Push preset using this.
JAz
Posts: 42
Joined: Thu Apr 26, 2018 11:06 pm

Thu Aug 29, 2019 7:47 pm

Tomas wrote:
Thu Aug 29, 2019 7:07 am

In Unimus 2.0.0, we are adding an API endpoint for pushing backups into Unimus.
This endpoint will support binary backups (as well as text backups of course).

You will be able to use the integrated MikroTik "fetch" tool to push a .backup file into Unimus from a Mass Config Push preset using this.
That sounds *awesome* 8-)

Do we have an ETA on 2.0.0?
Thanks Tomas.
User avatar
Tomas
Posts: 743
Joined: Sat Jun 25, 2016 12:33 pm

Thu Aug 29, 2019 7:57 pm

JAz wrote:
Thu Aug 29, 2019 7:47 pm

That sounds *awesome* 8-)

Do we have an ETA on 2.0.0?
Thanks Tomas.
We are hoping to have a public beta available at the end of September, or early October.
Post Reply