2

We rotate 2 TrueCrypt-encrypted USB hard drives ("BACKUP 1" and "BACKUP 2") off-site each week, for our data backup system.

For both drives, the physical drive has no drive letter assigned to it (not necessary); however, both mounted, virtual drives have the letter "V" assigned to them.

enter image description here

Can anyone suggest a script which would log the volume label of the external drive?

I will schedule this to run each night, so I can see which backup drive was on-site at any given point, allowing me to see if the disk rotations are not being done according to schedule.

Any ideas or suggestions would be much appreciated.

Austin ''Danger'' Powers
  • 1,180
  • 6
  • 21
  • 51
  • If you *really* think this needs to be closed- why not add a short comment explaining why? As I've said many times before: it should be *mandatory* to leave a comment explaining why you want to vote to close a question. If nothing else, it would provide more useful feedback. – Austin ''Danger'' Powers Aug 20 '13 at 07:41
  • 2
    It isn't immediately clear why this should be closed, except that it's very strange to use USB drives for backups in a proper enterprise environment (but really as long as they are verified I'm not sure there is anything wrong with that). Also, the term you're looking for is "volume label". – Falcon Momot Aug 20 '13 at 08:35
  • I agree that this would be strange- if it were an enterprise environment. However, this is a small, non-profit organization with only around 750GB of data on the file server. They neither have the budget nor the need for anything more advanced. Shadow Copy is enabled, which allows previous versions for the past 4 or 5 weeks to be retrieved. – Austin ''Danger'' Powers Aug 20 '13 at 09:28
  • 1
    This question appears to be off-topic because it doesn't show any research effort. – EEAA Aug 20 '13 at 11:50
  • 2
    I am **not** impressed by the elitist attitude that people think they can somehow tell if there was "no research effort" on the part of the OP. There WAS research effort. It is much easier to research something than to wait hours for a response. I couldn't find what I was looking for, so I asked here as a last resort. This whole "research effort" thing is *very* relative and subjective. Someone with more experience might find it easy to research a problem, but someone with less may find it easier to explain the problem, so that those with more experience can nudge them in the right direction. – Austin ''Danger'' Powers Aug 20 '13 at 19:51
  • I'm not sure I agree with a "close for lack of research effort" regardless. Downvote maybe (I wasn't the one that did), but having to have a member that frequents the site often spell out that they tried to find a solution upfront without the benefit of the doubt seems a little overkill to me. But again, voting is in the hands of the voter. – TheCleaner Aug 21 '13 at 13:12
  • @Austin''Danger''Powers "does not ***show*** any research effort" (emphasis added). i.e. "Tell us what you've tried and eliminated, so that we don't have to waste time telling you to do all the things you've already done." -- Not having that doesn't make your question Off Topic, but it does make it harder to answer. If you wish to discuss why this is part of our standards for a quality question please [open a discussion on Meta](http://meta.serverfault.com/questions/ask). I will be cleaning up comments on this question in the near future. – voretaq7 Aug 21 '13 at 13:21
  • It was a very clearly-presented question, which even had a screenshot. There was enough information, as evidenced by the fact the *very first* answer (the same day I posted) completely nailed it. I feel this "show research effort" rule is not applied to everyone equally. If you look, you can see that a massive percentage of questions show no research effort, but get no close votes at all. I got 3. It's a lottery. – Austin ''Danger'' Powers Aug 22 '13 at 14:01

2 Answers2

2

The command vol v: will tell the volume label.

The output will be something like this:

Volume in drive C is System

Volume Serial Number is 86DA-23A0

You might want to write the first line of the output to file like this:

vol v:|find "Volume in drive">>drivelog.txt

ZEDA-NL
  • 846
  • 1
  • 6
  • 13
2

Here is what I eventually did... thanks to the information from ZEDA-NL's answer:

vol v:|find "Volume in drive" >>"d:\Admin\USB backup drive rotation log.txt"

echo %date% >>"d:\Admin\USB backup drive rotation log.txt"

echo %time% >>"d:\Admin\USB backup drive rotation log.txt"

echo. >>"d:\Admin\USB backup drive rotation log.txt"

enter image description here

Austin ''Danger'' Powers
  • 1,180
  • 6
  • 21
  • 51