MySQLDump from view

I wanted to simply add an admin button in a view to create a dump file and allow the user to save it.

I tried spanjeta backup, but it doesn’t work properly (doesn’t handle nulls properly, can’t restore as it errors) so I figure it couldn’t be that hard to run a single command. Boy was I wrong. I’ve spent the last day trying this and that, searching online and trying various things and simply don’t seem to be making any progress (I’m sure it is easy once you know how, but sadly I don’t).

Yes, I’ve looked over the documentation, but most of it I find very confusing. I’m assuming I need to make a console Controller and call it.

If anyone can give any guidance, it would be greatly appreciated.

I can post what I currently have, although it may simple be best to start from scratch with proper guidance.