Does anyone know if there's a way to get weekday (either as a number or a word, I don't really care at this stage) from the current date in a MikroTik script.
In my current automatic backup script, I have:
Code: Select all
:local theDate [/system clock get date]
:local theDay [ :pick \$theDate 4 6 ]
At the moment, my automatic backup script just creates a new config export every day and then I have a small .NET program running on server on our network which logs in with SSH and downloads it.
What I would like to have is something a bit more like the backup regime that I have for other systems:
- A backup is taken every day, but these are only kept for 1 week, i.e. the Monday config export would be overwritten every Monday, the Tuesday overwritten every Tuesday etc.
- Additionally, a backup is taken every Monday, but this time kept for 1 week, and the files are recycled every month, giving me Week1, Week2 etc.
- Additionally, a backup is taken on the 1st of every month, and these backups are kept for 1yr before being recycled.
If it's not possible to get Weekday, then I will just edit the script to do a daily backup each day of the month and then one on the first of the month and recycle these files acordngly, as I can work out how to do this from what I've already got.
Any help gratefully received.
Thanks
Colin