How to Mass Clean Install EPBv2 With Datto RMM

If the Customer has Datto RMM and wants to Re-Deploy a group of EPBv2 Agents for any reason they deem necessary. They have the ability to stack components in order based on the original Re-Deployment script used to get customers on the Storage2 Format. 

 

Note: Components execute in the order added to the job, They will not move to the next step if the previous component fails. 

 

The script went as follows:

 

1. Uninstall the agent from the system

2. Delete following folder: C:\Windows\System32\config\systemprofile\AppData\Local\Datto Backup Agent

3. Reboot the system

4. Run the following command in CMD promt to perform a clean installation of the agent:

msiexec /i https://cf-dl.datto.com/dba/DattoBackupAgentInstaller-x64.msi REG_TOKEN=<DEPLOYMENT_TOKEN> CLEAN_INSTALL=1 /qn /L*V "C:\testFile.log"

5. Test the backup

 

 

There are many variants like this but for the most part the concept is the same. The only difference is this can be done as components in the RMM. 

 

1. First step is to create a job. 

2. Add the v2 component (same as the install method but we are uninstalling) See Below 

3. No token is necessary 

4. Second Component is found by typing powershell as you will need it to delete the directory properly. 

Powershell method to delete the directory

$path = "C:\Windows\System32\config\systemprofile\AppData\Local\Datto Backup Agent"; if (Test-Path $path) { Remove-Item -Recurse -Force -Path $path -ErrorAction SilentlyContinue }

 

5. Third Component is to reboot the Protected Asset, this is found by typing reboot or shutdown. Datto RMM has a special component that works with their agent. You don't have to use this component. Customers can choose to add an additional line in the second component powershell script to reboot the Protected Asset if they choose. Keep in mind this does not allow for step validation should the deletion of the folder runs into an issue. If they merge the steps and either portion of the script fails, the customer will have a harder time troubleshooting which step failed. All 3 component steps shown below. 

 

Note: The Timeout value for the reboot step should be changed to 60 seconds or higher for best practice. Too short of a timeout will generate a false positive for a failed RMM Job. 

6. Final step is customer choice of why they are re-deploying the agent. Biggest factor is whether they need to keep the old backups or not. 

For a simple re-install:

If they need to keep the backups, They can simply add another component to the job for installation (same as the uninstall in step 1). Mind the Deployment Token and ensure "Validate Device Compatibility" is selected. 

 

If moving storage formats:

Use the RMM agent to Quick job the Protected Asset or launch the remote shell and use the

msiexec /i https://cf-dl.datto.com/dba/DattoBackupAgentInstaller-x64.msi REG_TOKEN=<DEPLOYMENT_TOKEN> CLEAN_INSTALL=1 /qn /L*V "C:\testFile.log"

To directly define the CLEAN INSTALL argument.

 

If they are an MSP and Decommissioning a Customer: 

Inform the MSP that deleting the Protected Asset from UniView is required and they must retain the old Agent ID for their records. In the event there's billing contention they will need that ID for Senior Engineers to discover the data that was once associated to their tenant. 

 

 

 

 

 

 

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section