Hi all,
I wonder if it is possible to include a robocopy command inside the vault backup script. what I want to do is to create a backup in the the server hosting ADMS and then make a copy of the backup to a network location. something like this:
*********************************************************************************************************
@ECHO OFF
REM DELETE B AND CASCADE A BACKUP SUBDIRECTORIES
RMDIR /Q /S "C:\Backup\Vault\B"
REN "C:\Backup\Vault\A" "B"
REM CREATE A NEW DIRECTORY FOR THE BACKUP
MKDIR "C:\Backup\Vault\A\"
REM START THE BACKUP PROCESS
"C:\Program Files\Autodesk\Data Management Server 2009\ADMS Console\Connectivity.ADMSConsole.exe" -Obackup -B"C:\Backup\Vault\A" -VUadministrator -VP -S
REM COPY BACKUP FOLDER TO NETWORK LOCATION
robocopy "C:\Backup\Vault\A" "D:\Backup\Vault\A" /MIR /W:20 /R:15
robocopy "C:\Backup\Vault\B" "D:\Backup\Vault\B" /MIR /W:20 /R:15
***********************************************************************************************************
I did try this last night. It created tha backup successfully in the local server, but it did not copy the files to the network location. In this case 😧 is a mapped drive to a different server.
the script is saved at the root of C: and it runs at night with windows task scheduler with the option of running the task regardless if the user is logged in and with highest privileges.
I also tried runnig the robocopy command directly in the command prompt and it works fine.
Can anyone see what is wrong?
Thanks in advance.
Vault Basic 2014 - Windows 7 professional 64 bit - 32 GB Ram
Solved! Go to Solution.
Solved by johannes.bauer. Go to Solution.
hey there,
2 points:
a) use the /LOG command to see why it is failing within robocopy Robocopy Reference
b) is D:\ as network share mapped with the user you are executing it and is it mapped with /persistent switch!?
and for sure - make sure the user you use to execute the script has access on the other server.
HTH
Hannes
Thanks Hannes!
I added the /log switch to the command. nice tip!
As per the robocopy reference link I replaced 😧 for \ \servername\foldername maybe it works. I will let you know tomorrow.
How can I check if the drive is mapped with the /persistant switch?
If the server you are backing up to is Linux-based you may need to add the following switches; /COPY:DT /FFT
EDIT: Apparently putting colon followed by the letter D is rendered as a smiley face on the message board. Therefore the line above should be /COPYCOLONDT /FFT
-Ryan
Thanks guys, It worked!
Checking permissions and using \\servername\foldername instead of the mapped drive letter did the trick.
Thanks Ryan for the advice. It is a windows server in my case but for sure it will help others. And now I know how to put smiley faces in my comments .