Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(revision 2514)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(working copy)
@@ -137,6 +137,10 @@
             'message': "Invalid Time format. Use HH:MM"
         }), content_type='application/json', status=400)
 
+    frequency = str(frequency).strip().lower()
+    hours = str(hours).strip()
+    minutes = str(minutes).strip()
+
     if frequency == ServiceUtils.WEEKLY and day_of_the_week is None:
         return HttpResponse(json.dumps({
             'error': 400,
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py	(revision 2514)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py	(working copy)
@@ -117,7 +117,9 @@
                     "message": "Restore Completed Successfully at {}".format(restore_time)}),
                     content_type='application/json')
             elif "failed" in line:
-                return HttpResponse(json.dumps({"message": "Restore Failed!"}), content_type='application/json')
+                return HttpResponse(json.dumps({"status": "Failed",
+                                                "message": "Restore Failed!"})
+                                    , content_type='application/json')
     except Exception as e:
         message = str(e).replace("'", "")
         oper_log('error', 'system', 'Exception while restoring backup.,  details: {}'.format(message))
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/restore_service.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/restore_service.py	(revision 2512)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/restore_service.py	(working copy)
@@ -54,10 +54,13 @@
                 path = path if path.endswith("/") else path + "/"
                 try:
                     ServiceUtils.run_command('sshpass -p {} scp -o StrictHostKeyChecking=no -o '
-                                         'UserKnownHostsFile=/dev/null {}@{}:{} {}'
-                                         .format(password, username, ip, path + filename, FILE_UPLOAD_PATH + filename),
-                                         restore_logger)
+                                             'UserKnownHostsFile=/dev/null {}@{}:{} {}'
+                                             .format(password, username, ip, path + filename,
+                                                     FILE_UPLOAD_PATH + filename),
+                                             restore_logger)
                 except Exception as e:
+                    restore_logger.info("Back up file not found")
+                    restore_logger.info("Restoring backup failed!")
                     return HttpResponse(json.dumps({
                         'error': 404,
                         'message': "Back up file not found on remote server."
@@ -65,6 +68,8 @@
 
                 backup_file = os.path.join(FILE_UPLOAD_PATH + filename)
                 if not os.path.isfile(backup_file):
+                    restore_logger.info("Back up file not found")
+                    restore_logger.info("Restoring backup failed!")
                     return HttpResponse(json.dumps({
                         'error': 404,
                         'message': "Back up file not found. Please upload the file using upload api."
@@ -74,6 +79,8 @@
             elif destination == ServiceUtils.LOCAL:
                 backup_file = os.path.join(FILE_UPLOAD_PATH + filename)
                 if not os.path.isfile(backup_file):
+                    restore_logger.info("Back up file not found")
+                    restore_logger.info("Restoring backup failed!")
                     return HttpResponse(json.dumps({
                         'error': 404,
                         'message': "Back up file not found. Please upload the file using upload api."
@@ -94,8 +101,10 @@
             restore_logger.info("Restoring Postgres DB")
             pg_dump = os.path.join(RESTORE_DIR, "postgres_backup.dump")
             if os.path.exists(pg_dump):
-                cmd = ("/usr/pgsql-10/bin/pg_restore -U {} -h {} -p {} -d {} -c {}".format(ServiceUtils.POSTGRES_USER, ServiceUtils.POSTGRES_HOST,
-                                                                                           ServiceUtils.POSTGRES_PORT, ServiceUtils.POSTGRES_DB,
+                cmd = ("/usr/pgsql-10/bin/pg_restore -U {} -h {} -p {} -d {} -c {}".format(ServiceUtils.POSTGRES_USER,
+                                                                                           ServiceUtils.POSTGRES_HOST,
+                                                                                           ServiceUtils.POSTGRES_PORT,
+                                                                                           ServiceUtils.POSTGRES_DB,
                                                                                            pg_dump))
                 ServiceUtils.run_command(cmd, restore_logger)
                 restore_logger.info("Postgres DB restored successfully.")
