I have been trying to set up automatic snapshots of my hard drives in my development system for a week and kept running into little snags along the way. I figured I would share the solution for anyone else looking to do the same.
I am using DriveSnapshot to take the snapshot. You can download it for free, however, if you wish to use it long-term, you will need a license. At this time, it is around $39 for a workstation license.
DriveSnapshot has a really nice set of command line parameters and my goal was to backup to my Drobo FS. The issue was that DriveSnapshot requires elevated privileges. So I when my script was running, it could not access my backup share on my Drobo by mapped drive or by UNC path. The reason is that mapped drives do not exist, nor are my credentials for the UNC path present, in the session with elevated privileges.
- Create backup user on the Drobo. (This is really optional, but you have to put the password in a plain text batch file so I opted not to use my admin account.)
- Map the drive in the script so that it is available in the elevated session and pass the credentials in the
- Call DriveSnapshot to actually perform the backup.
- Include a cleanup if you wish. I am deleting all files older than 30 days with the
- Delete the drive mapping.