Find us on Google+ The Importance of Being Earnest (about Autodesk Vault Backups). ~ Inventor Tales

Thursday, December 10, 2009

The Importance of Being Earnest (about Autodesk Vault Backups).


Rule: 13 Always have a plan.
Rule 13.1 Have a back-up plan, because the first one won't work.

Marine Corps saying

I have to confess that I'm about as guilty of this as anyone. But when is the last time you verified that you were backing up your data. Really? Seriously?

This could be your personal photos, bank records, or engineering data. Think for a moment. What would happen if the hard drive in your computer suddenly ground to a halt?

The thought is pretty scary, isn't it?

We should always be backing up our computers. Always. It could be as simple as going to Best Buy, getting an external hard drive, and copying files to the drive every week.

In this document, I'm going to talk about backing up your Vault. It's a little more advanced than just copying and pasting the files from one place to another, but once dialed in, it's very robust.

And if you want to make sure your data can survive any unforeseen issues, it's necessary.

The most straight forward way is to open up the Autodesk Data Management Server (it will be located on the computer hosting your Vault, and performing a manual backup through the graphical user interface (AKA GUI).


Step 1: Locate the Backup and Restore tools
(click to enlarge)

Step 2: Choose backup.
(click to enlarge)

Step 3: Choose your backup destination
(click to enlarge)

This can be pretty effective, however, it also relies on the user being diligent about kicking off the backup. If you want to automate the process, you can use a script similar to the one below.

This particular script creates what is called a cascading backup. That is it keeps two versions of the backup. For example. If you're running a backup every night, the backup in folder 'A' is the most current backup. The backup in folder 'B' is one day old.

When the backup runs again, the following process happens.
1) Folder 'B' is purged
2) Folder 'A' is renamed to Folder 'B'
3) A new Folder 'A' is created with the most recent backup.

In this way, the backups cycle through, keeping two versions on at all times. In addition, these files can (and probably should) be automatically copied to another storage device external to the machine. This ensures another level of protection should the server hosting the data have a catastrophic failure.

Here's an example of the script I use. My comments are in red. The script is in green.

@ECHO OFF <=Turns off command reporting on screen
REM DELETE B AND CASCADE A BACKUP SUBDIRECTORIES
RMDIR /Q /S "C:\Backup\Vault\B" <= Removes old Folder "B"
REN "C:\Backup\Vault\A" "B" <= Renames Folder "A" to Folder "B"
REM CREATE A NEW DIRECTORY FOR THE BACKUP


MKDIR "C:\Backup\Vault\A\" <=Creates new Folder "A"
REM START THE BACKUP PROCESS (THIS IS ONE LINE OF TEXT)
"C:\Program Files\Autodesk\ADMS Manufacturing 2010\ADMS Console\Connectivity.ADMSConsole.exe" -Obackup -B"C:\Backup\Vault\A" -VUadministrator -VP -DBSC -S

Here are the switches defined.

Connectivity.ADMSConsole.exe <= Vault Executable

-OBackup <= Tells Vault this is a backup operation "C:\Backup\Vault\A" <= Tells Vault backup location

-VU <= Key for Vault Admin username (in this case "Administrator)

-VP <= Key for Vault Password (in this case no password is used)

-DBSC <= Tells Vault not to backup standard content center libraries. This makes for a faster backup taking up less disk space. You can always add your libraries from the installation disks if you need to restore.

-S <= Runs silently. No dialog boxes are shown when this switch is included.

More information on the script can be found by going into the Autodesk Data Management Console help system, and searching for "Command Line Backup".

Save this as a file with a *.bat extension, and run it as a scheduled task in Windows. Different operating systems vary slightly, but here's a link to how to set one up in Windows XP.

Last but not least. Once the script starts running, make sure to verify that it runs correctly and backs up data! Please!

Some of the things I've seen:
  • The Vault backup script seen listed in scheduled tasks. Not recognizing it, it's removed without verifying what it's used for. No backup is made for around 6 months!
  • The VaultAdministrator password is changed. However, the -VP switch in the script is not. No backup created!
  • The backup location runs out of disk space. This isn't caught.
  • Vault is upgraded and moved to a new directory. The script is forgotten and isn't upgraded.
The moral of the story? Verify your backups periodically. It takes a few minutes, and can save countless hours of headache, and heart ache.

If possible, you can even restore the backup on a second machine, just to ensure your backups are valid and there are no corruptions during the backup.

You might call me paranoid, but as a good friend in IT once asked me, "Have you ever wished you hadn't made a backup?"

Sometimes, a little paranoia can be a good thing!

2 comments:

  1. This post was very helpful. I have been trying to set up automatic vault backups, and between this and the Autodesk documentation I have it working now. One flaw in the .bat file that I have come across while trying to get this working is that if the vault backup does not complete 2 times in a row all of your backups are deleted. The first time that it does not complete, the A directory ends up empty and you have a 1 day old backup in the B directory. The second time the backup does not complete, both the A and B directories are empty. I have tried putting in some conditions like if A directory is empty then just run the backup and do not cascade the directories, but I'm not very good at batch file commands so I haven't been able to get it to work yet. For me, this problem showed up when I upgraded from 2010 to 2011 and the program path changed. I checked my backups and the A directory was empty and I noticed to changed the path. If I had not checked this for two days, I would not have any backups. (Except for the backup of the backup that I make).

    ReplyDelete
  2. I can't say I've seen that exact circumstance occur before, but here's a couple of thoughts where I've seen something similar appear.

    1) Make sure your password in your script match the password in the Vault. If not, the actual backup portion can't execute, although the deletion of directories still can.

    2) You stated this happened after upgrading to 2011. Make sure you update the script to reflect the new 2011 installation directories. It could be that the script can execute the *.exe, which could cause the same issue.

    The only other thing that comes to mind, and this is purely speculative, is if some sort of virus protection or another security precaution things the script is doing something naughty, and is halting it.

    I hope this helps point you in the right direction!

    ReplyDelete