RobotStudio event

Problem restoring backup

This question has been posted before but there has not been a useful answer.
I'm trying to implement the functions Backup and Restore from the Controller class.

 

The Backup functions works correctly and I'm able to create a backup with the function.

But when I'm trying to restore the backup it gives the following exception: "Value does not fall within the expected range.".

When I try to restore the same backup using the restore function from the flexpendant it works fine.

 

I have the correct masterships (both Rapid and Configuration), the correct rights (UAS_RESTORE) and the controller is in auto mode.

 

Does somebody know the solution for this problem?

Comments

  • I found the solution for my problem.
    The string that I gave to the Controller.Restore() function as parameter was wrong.
    I had to add "ctrl:" to the string that I gave as path.

     

    Example: (this gave the "Value does not fall within the expected range." error)

    string path = "C:/BACKUP/TestBackup/";

    mController.Restore(path);

     

    This has to be:

    string path = "ctrl:C:/BACKUP/TestBackup/";

    mController.Restore(path);