Hi all,
In an effort to speed up our vault backups I'd like to backup vault to a temorary folder, then move it to a mapped drive on another server, then delete the temp folder.
I'm not very strong in the script writting category, could someone tell me if this looks correct.
@Anonymous OFF
REM DELETE B AND CASCADE A BACKUP SUBDIRECTORIES
RMDIR /Q/S ":V\B"
REN ":V\A" "B"
REM CREATE A NEW DIRECTORY FOR THE BACKUP
MKDIR "C:\A\"
REM START THE BACKUP PROCESS IN NEW COMMAND PROMT AND WAIT TO FINISH
START /WAIT /I "NEW COMMAND PROMPT" "D:\Autodesk\ADMS 2014\ADMS Console\Connectivity.ADMSConsole.exe" -Obackup -B"C:\A\" -VU"Administrator" -VP -DBSC -S -L"V:\Vault Backup Log\Vault Backup Log.txt"
REM MOVE BACKUP TO DIFFERENT LOCATION
XCOPY "C:\A" "V:\A" /i /s /e /h
REM DELETE LOCAL BACKUP FOLDER
RMDIR /Q/S "D:\A"
Do I need the "START /WAIT" or will the sript wait on it's own?
You shouldn't need the Start /WAIT.
Check your first rename, you're missing the drive letter.
What I would do for batch files is run it with @Anonymous ON, then you can see which commands produce errors. You can aslo do a step by step of each command in a command line window.
When using drive letters, make sure that the account you are using in task schedueler to run thsi script has that drive mapping as a persistent drive mapping, otherwise, you'll need to map it in the script. Better yet, use the UNC path instead.
-Hywel