added sshpass from conatiner to host
[ealt-edge.git] / example-apps / ROBO / backup_BE / src / main / java / org / edgegallery / example_app / service / restoreService.java
index cd8881a..b981e9f 100644 (file)
@@ -21,7 +21,9 @@ public class restoreService {
     ShellCommand shellCommand;
 
     public String create_restore(String restorename, String backupname) {
-        String command = "velero restore create " + restorename + " --from-backup " + backupname;
+        String ip = System.getenv("HOSTIP");
+        String command = "sshpass ssh root@" + ip + " velero restore create " + restorename + " --from-backup " +
+                         backupname;
 
         String output = shellCommand.executeCommand(command);