How to really make backups (by script) ?

I'm reading too much nonsense in this thread.

The MikroTik backup works perfectly, based on how it's described here:
https://en.wikipedia.org/wiki/Backup
Nowhere does it say CLONING (or MIGRATION).

So if you don't have spare identical hardware, you've done the wrong thing from the start.
If you actually WORK with something, you ALWAYS have identical machines (even if unconfigured, but at least tested) as backups ( :joy: ).

If you need to CLONING (not for definitive replace) or MIGRATION, that's obviously a different story, and the whole backup concept doesn't make any sense.

I've had to update hardware many times, exporting and saving certificates, etc. (for that, I even have my own script for saving absolutely everything from the router).
Just open the export in Notepad, adjust the names of the ethernet and/or wireless ports, if applicable, and you can easily apply the export on new device.

Switching from wireless to wifi is a different matter, which is obviously a whole other story.

So, all in all, the real problem is that first you need to understand what a backup is, and then we can talk about the rest.

I really wonder how few boxes you have to keep working. Cannot be that much, else you would understand that an “export” that contains everything would save a lot of worktime. And it would be damn easy to add some flag to the export command telling it “I want everything”. So this is then upward/downward compatible. And if you don’t want it, don’t use it. And that’s about it. And for everybody else it would be a great help.

The backup works,
restoring to an identical machine works
(and I wrote identical, not SIMILAR or anything else that doesn't mean anything other than identical,
other than the NAND/XOR flash serial number, MAC addresses and licence, obviously).

More than that, it obviously has to be the same version of RouterOS, otherwise are just talking nonsense.

So the entire topic, from the title to the OP, is about the backup, and it works.

Talking about anything else, for example "export", is pointless unless you open another topic with a relevant title and OP.

How to really make backups (by script) ?

Solution:

/system backup save name=backupname password=backuppass encryption=aes-sha256 dont-encrypt=no

Anyway....

Folks are here to help you fix or improve whatever workflow lead you here. I'm just lost on the use case that not covered by some adaptation to some workflow. Sounds like your not a SOHO/home user and worried about "breaking" config or routeros version boot loop or whatever. Regardless however having a backup file is what you want. If the case is provisioning new units for fields, that one thing. If it's restoring a customer router that broken, that a different thing.

Since the workflow depending on your particular business...is why it's config scheme is complex since it pretty flexible to adapt to some common workflow for this. @rextended and I do not take identical approaches to setup of new routers, but the scheme allow both our schemes and other folks variants too. There are commercial tools that use these config/backup scheme that have some licensing cost, but if this a huge labor costs, that's something to look at as there are sophesticated tools on market to manage mikrotik config that's build in the plumbing included.

@Amm0 Since it's quite difficult to prove whether you're actually managing 1 or 10,000 devices here on the forum, it's all just empty words, so I've skipped that part.

I simply don't use every possible variant of all the MikroTik hardware, and I have a backup of every single device that's automatically done at night at a staggered time based on the MAC address to avoid overwhelming the system with a flood of requests at the same time.
With my experience and the scripts I write, it takes me a moment to get things done. These statements obviously need to be proven, but the thousands of scripts and posts I've made on the forum speak for themselves...