Showing posts with label backup and recovery. Show all posts
Showing posts with label backup and recovery. Show all posts

Tuesday, March 26, 2013

Acronis Bootable Agent Management Console frustration (crtl+m is the answer)

I decided a long time ago my blog is here to help me and whoever shows up (both of you). This morning I have been reminded of something that is annoying about Acronis' recovery disc and I spent all of five frustrating minutes looking up things I've looked up before.

I've whined about Acronis before, and over all I am satisfied with their business products. In my opinion they get the hard parts of backup and recover done so well that the shortcomings of their UI are more noticeable. Here is a short list of my complaints with Acronis Bootable Agent Management Console.

  • Tabbing through text boxes don't always show a flashing cursor, so I have no idea where I am
  • Tab navigation doesn't make sense on some screens.
  • Tab navigation doesn't scroll the screen (and most of the time I'm in recover mode the screen is 1024x768 or less)
  • Not all menu items are accessible with the keyboard
That last one is solvable through a lame implementation of using the mouse through the keyboard, but it creates it's own list of nitpicks. I end up in the recovery console regularly enough without mouse support it becomes annoying, but I never remember crtl+m. That's why it's so big, next time I can't remember it I can come here and find it in less time than looking it up from scratch.






Tuesday, February 26, 2013

The Date Command... I mean Environmental Variable


It clicked for me how the date command environmental variable works in Windows. Seems like such a simple idea, and for all the information on the Internet about it no one explains it like this (at least not that I've found). Most only show what to type to get a desired result.

Let's say you run md %date:~10,4% from a command prompt. You just made a folder named 2013. Unless you run that same command a year from now, then you'll make a folder named 2014. This can get complicated quick. Consider:
z:\logs\%Date:~-4,4%-%Date:~-10,2%-%Date:~-7,2%_Server1.txt
This is a file at "z:\logs\2013-02-26_Server1.txt". Well, for today anyway.

At it's simplest you can copy and paste what you need below (why not that's what the rest of the Internet tells you to do--if you want to know why these work don't skip the last section).
  • Four Digit Year     %Date:~-4,4%
  • Two Digit Month    %Date:~-10,2%
  • Two digit Day      %Date:~7,2%
Note that in the considered example these chunks of text are separated by dashes '-' which is what makes the date look the way it does. Without them it would just be a jumble of numbers, 20130226, which is a personal preference. You could use slashes '/' if this didn't deal with a file name (slashes are invalid characters for a file name).


%Inside the Percent Symbols%


For those of use that like to know why things work open a dos prompt and type date /t. The output will be something like this:
Tue 02/26/2013
Calling %Date:~-4,4%, which can also be done from the command prompt by typing echo %Date:~-4,4%, will return the last four digits of the above date sting. Negative 4 means to start four places from the end, then the 4 tells it to go four  places to the right: which is where the year is kept. %Date:~10,4% will return the same thing, the difference is the command starts from the left, moves 10 places to the right, then grabs the next four places. The same is true for the month and day.

You can return anything in that 14 digit string, we only exclude the slashes in file operations because of name limitations. For kicks you could run echo %Date:~1,6% from the command prompt to get back "ue 02/2". If you had a need for that for whatever reason. Note the first place in the string is 0 not 1. To get the three letter day of the week would require echo %Date:~0,3%.

To learn more search results may be misleading if you are looking for help with "dos date", try a search on terms like "dos string manipulation". That pointed me in the right direction.


Bonus: Why am I using some goofy date format?

It's sortable.

Let's face it, Month/Day/Year just doesn't make sense. It's out of order. I could see an argument for Day/Month/Year, but that still lacks logical sortability. 

http://en.wikipedia.org/wiki/ISO_8601

EDIT: 2013-05-09 (see what I did there), It was pointed out to me there is a difference between the command date and the environmental variable %date%. This post deals with the environmental variable not the command.