Minor alterations to backup exporter script

Post your feature requests here
Post Reply
kingtrw
Posts: 51
Joined: Sun Dec 26, 2021 8:56 pm

Fri Mar 25, 2022 11:15 am

Very very low priority but I thought I'd mention it as it may help others!

I'm using the excellent https://github.com/netcore-jsa/unimus-backup-exporter to have our server mail our support account with a .zip of the most recent config files on a regular basis.

I had some problems making it work nicely, and while I've got a horrible hacky script that has it working for now, I think some minor changes to the way the exporter script operates could be of significant benefit. I'm not confident enough in my scripting to try making them myself, so I thought I'd mention them:

* Timestamps - the current exporter saves files with colon seperated timestamps. Unfortunately Windows' default zip handler can't cope with trying to extract files with colons in them, and so gives a fairly generic error. 7-zip is fine, but a bit less convenient to use. I've made a parser to strip out the colons, but I think the script would be improved if it didn't use colons - YYYYMMDDHHMMSS would be the preferential datestamp format from my perspective (though maybe it could be specified as a variable in the config?)

* Spaces in filenames - the current exporter creates directories with spaces in the path, which adds a little bit of complexity when scripting stuff to work with them, and makes navigating the folders from the command line a little harder. My preference would be if it used underscores instead of spaces.

* Colour in text output - by default the script's text output is green, and the control characters for this get printed when it's directed into the cron mailer, which then appear in the email. I'm pretty sure I can remove them with the appropriate regex, but for preference I think it'd be easier if the default output of the script was uncoloured.

Otherwise it's super useful :)
Vik@Unimus
Posts: 198
Joined: Thu Aug 05, 2021 6:35 pm

Mon Mar 28, 2022 6:27 pm

These are not bad ideas at all. We might look into that in the future. Would you mind creating an issue for each of the feature requests at the Github page?

https://github.com/netcore-jsa/unimus-b ... ter/issues
kingtrw
Posts: 51
Joined: Sun Dec 26, 2021 8:56 pm

Mon Apr 11, 2022 10:15 am

Done, thanks!
Post Reply