Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.controller.js
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.controller.js	(revision 0)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.controller.js	(working copy)
@@ -0,0 +1,141 @@
+angular
+    .module('cm.system')
+    .controller('restoreCtrl', [
+        '$scope',
+        '$rootScope',
+        '$state',
+        '$uibModal',
+        '$filter',
+        'systemService',
+        '$interval',
+        'FileUploader',
+        function ($scope, $rootScope, $state, $uibModal, $filter, systemService, $interval, FileUploader) {
+            $rootScope.title = "Restore";
+            $rootScope.allow_config = true;
+            let restoreModel = this;
+
+            restoreModel.status = 'N/A';
+            restoreModel.description = '';
+            restoreModel.filename = '';
+
+            function getRestoreStatus() {
+                systemService
+                    .getRestoreStatus()
+                    .then(function (res) {
+                        if (res && res.status === 200) {
+                            let restoreStatusResponse = res.data;
+                            // restoreModel.status = restoreStatusResponse.status;
+                            restoreModel.description = restoreStatusResponse.message;
+                        }
+                    });
+            }
+
+            getRestoreStatus();
+
+            if (!angular.isDefined($scope.DataTimer)) {
+                $scope.DataTimer = $interval(function () {
+                    getRestoreStatus();
+                }, 10000);
+            }
+
+            $scope.$on('$destroy', function () {
+                if (angular.isDefined($scope.DataTimer)) {
+                    $interval.cancel($scope.DataTimer);
+                    $scope.DataTimer = undefined;
+                }
+            });
+
+            restoreModel.startRestore = function () {
+                restoreModel.showProgressBar();
+                systemService
+                    .startRestore({})
+                    .then(function (res) {
+                        $rootScope.$broadcast('endLoading', true);
+                        if (res && res.status === 200) {
+                            $rootScope.TipService.setMessage($filter('T')(res.data.message));
+                        } else {
+                            $rootScope.TipService.setMessage($filter('T')("The attempt to back up the system failed."));
+                        }
+                    })
+            }
+
+            restoreModel.showProgressBar = function () {
+                let modalInstance = $uibModal.open({
+                    templateUrl: 'app/modules/common/templates/progress.html',
+                    controller: 'showProgressCtrl',
+                    controllerAs: 'progress',
+                    backdrop: false
+                });
+            };
+
+            restoreModel.cancel = function () {
+                restoreModel.showProgressBar();
+                getRestoreStatus(function () {
+                    $rootScope.$broadcast('endLoading', true);
+                });
+            };
+
+            let showProgressBar = function () {
+                let modalInstance = $uibModal.open({
+                    templateUrl: 'app/modules/common/templates/progress_with_value.html',
+                    controller: 'showProgressCtrlWithValue',
+                    controllerAs: 'progress',
+                    backdrop: false
+                });
+                modalInstance.result.then(function () {
+                    fileUploader.cancelAll();
+                    fileUploader.clearQueue();
+                    document.getElementById('textfield').value = "";
+                    document.getElementById('uploadfield').value = "";
+                });
+            };
+
+            let fileUploader = restoreModel.file_uploader = new FileUploader({
+                queueLimit: 1,
+                url: '/upload',
+                autoUpload: true,
+                removeAfterUpload: true,
+            });
+
+            fileUploader.onBeforeUploadItem = function (item) {
+                showProgressBar();
+            };
+
+            fileUploader.onSuccessItem = function (item, response, status, headers) {
+                if (!response.error) {
+                    restoreModel.local = response.files[0].url;
+                    $rootScope.$broadcast('endLoading', true);
+                }
+            };
+
+            fileUploader.onProgressItem = function (item, progress) {
+                $rootScope.$broadcast('upLoading', progress);
+            };
+
+            restoreModel.submit = function () {
+                let filename = document.getElementById('textfield').value;
+                if (!filename || filename.length === 0) {
+                    $rootScope.TipService.setMessage("Please choose a valid file.");
+                    return;
+                }
+                let confirm_msg = $filter('T')("Before initiating the system restore process, please be advised that your system may experience a temporary period of unavailability upon completion. Would you like to proceed with the restoration at this time?");
+                if (confirm(confirm_msg)) {
+                    restoreModel.showProgressBar();
+                    systemService
+                        .startRestore({"filename": filename})
+                        .then(function (res) {
+                            $rootScope.$broadcast('endLoading', true);
+                            if (res && res.status === 200) {
+                                if (res.data && res.data.error === 400) {
+                                    $rootScope.TipService.setMessage(res.data.message);
+                                    $rootScope.$broadcast('endLoading', true);
+                                }
+                            } else {
+                                $rootScope.TipService.setMessage("Failed to restore the AMP, please try again.");
+                                $rootScope.$broadcast('endLoading', true);
+                            }
+                        })
+                }
+            }
+        }
+    ]);
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.html
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.html	(revision 0)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/restore/restore.html	(working copy)
@@ -0,0 +1,74 @@
+<div class="row">
+    <div class="col-lg-12">
+        <div class="widget">
+            <div class="widget-header">
+                <span>{{ 'Restore' | T }}</span>
+            </div>
+            <br>
+            <div class="align-right" ng-if="">
+                <button class="btn btn-primary" ng-click="restore.startRestore()" style="margin-right: 4px">
+                    {{ 'Create Restore' | T }}
+                </button>
+            </div>
+            <br>
+            <div class="table-responsive">
+                <div class="form-group"
+                     ng-if="restore.status=='In-Progress'">
+                    <div class="align-center">
+                        <span class="system-restore">System restoration is currently in progress. Please wait.</span>
+                    </div>
+                </div>
+                <div class="form-group"
+                     ng-if="restore.status=='N/A' || restore.status=='Completed' || restore.status=='FAILED'">
+                    <div ng-if="restore.status=='Completed'">
+                        <span class="system-restore success">The recent system restore operation has been completed successfully.</span>
+                    </div>
+                    <div ng-if="restore.status=='FAILED'">
+                        <span class="system-restore failure">An error occurred during the recent system restore operation.</span>
+                    </div>
+                    <div class="align-right">
+                        <div class="col-md-3"></div>
+                        <div class="col-md-6">
+                            <div class="align-center">
+                                <input type="file" id="uploadBackupFile" class="file form-control" nv-file-select
+                                       uploader="restore.file_uploader"
+                                       onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
+                                <input type="text" id="textfield" class="form-control">
+                                <br>
+                                <button class="btn btn-primary" ng-click="restore.submit()">{{'Restore' | T}}</button>
+                            </div>
+                        </div>
+                        <div class="col-md-3"></div>
+                    </div>
+                </div>
+            </div>
+            <div class="widget-footer">
+                <span class="restore-note">Note: </span><span>The restore process will substitute your current information with the backup data.</span>
+            </div>
+        </div>
+    </div>
+</div>
+
+<style>
+    .system-restore {
+        font-size: large;
+        font-weight: normal;
+        color: #3478bb;
+    }
+
+    .failure {
+        font-size: medium;
+        color: orangered;
+        padding-left: 10px;
+    }
+
+    .success {
+        font-size: medium;
+        padding-left: 10px;
+    }
+
+    .restore-note {
+        font-size: 14px;
+        font-weight: 400;
+    }
+</style>
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html	(revision 2494)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/submenu/update/update.html	(working copy)
@@ -77,7 +77,7 @@
                                 <div class="local">
                                     <input type="text" id="textfield" class="form-control">
                                     <button class="btn btn-primary" style="position: absolute; top: 0; right: 15px;">{{'Browse'|T}}</button>
-                                    <input type="file" id="uploadfield" class="file form-control" nv-file-select uploader="systemUpdate.file_uploader" onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
+                                        <input type="file" id="uploadfield" class="file form-control" nv-file-select uploader="systemUpdate.file_uploader" onchange="document.getElementById('textfield').value=this.value.split('\\').pop()">
                                 </div>
                             </div>
                         </div>
@@ -104,11 +104,11 @@
 </div>
 
 <style>
-    .file-box{ 
+    .file-box{
         position: relative;
-    } 
-    .file{ 
-        position: absolute; 
+    }
+    .file{
+        position: absolute;
         top: 0;
         opacity: 0;
     }
@@ -124,4 +124,4 @@
     .form-horizontal .file-box {
         width: 370px;
     }
-</style>
\ No newline at end of file
+</style>
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html	(revision 2494)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.html	(working copy)
@@ -40,6 +40,9 @@
             <li role="presentation" ng-class="{ active: url_contain('/system/backup') }">
                 <a ui-sref="index.system.backup">{{ 'Backup' | T }}</a>
             </li>
+            <li role="presentation" ng-class="{ active: url_contain('/system/restore') }">
+                <a ui-sref="index.system.restore">{{ 'Restore' | T }}</a>
+            </li>
         </ul>
     </div>
 </div>
@@ -57,5 +60,5 @@
     <div class="" ng-show="url_contain('/system/auth_aaa')" ui-view="admin_aaa"></div>
     <div class="" ng-show="url_contain('/system/log')" ui-view="log"></div>
     <div class="" ng-show="url_contain('/system/backup')" ui-view="backup"></div>
+    <div class="" ng-show="url_contain('/system/restore')" ui-view="restore"></div>
 </div>
-
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js	(revision 2494)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.module.js	(working copy)
@@ -244,7 +244,17 @@
                     }
                 }
             });
+        $stateProvider
+            .state('index.system.restore', {
+                url: '^/system/restore',
+                views: {
+                    'restore@index.system': {
+                        templateUrl: 'app/modules/system/submenu/restore/restore.html',
+                        controller: 'restoreCtrl',
+                        controllerAs: 'restore'
+                    }
+                }
+            });
     }]);
 
 angular.module("cmApp").requires.push('cm.system');
-
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js	(revision 2494)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/client/app/modules/system/system.service.js	(working copy)
@@ -81,6 +81,9 @@
                 //Backup
                 getBackupStatus: getBackupStatus,
                 startBackup: startBackup,
+                //Restore from Backup
+                getRestoreStatus: getRestoreStatus,
+                startRestore: startRestore,
             };
 
             function getUpdateVersion() {
@@ -370,5 +373,10 @@
             function startBackup(payload) {
                 return apiService.post2('/backup/start', payload);
             }
+            function getRestoreStatus() {
+                return apiService.get('/restore/status');
+            }
+            function startRestore(payload) {
+                return apiService.post2('/restore/start', JSON.stringify(payload));
+            }
         }]);
-
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 2494)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/restore_controller.py	(working copy)
@@ -15,21 +15,19 @@
 def handle_restore_req(request, path=None):
     try:
         if path == 'start' and request.method == 'POST':
-            if 'backup_file' in request.FILES:
-                uploaded_file = request.FILES['backup_file']
-                filename = os.path.join("/tmp" + uploaded_file.name)
+            obj = request.body
+            obj = json.loads(obj)
+            if 'filename' in obj:
+                uploaded_filename = obj['filename']
+                filename = os.path.join("/tmp/webui_upload/" + uploaded_filename)
 
                 if not filename.endswith("tar.gz"):
                     return HttpResponse(json.dumps({
                         'error': 400,
-                        'message': "Invalid file type. please upload file with extention tar.gz"
+                        'message': "Invalid file type. please upload file with extension tar.gz"
                     }), content_type='application/json')
 
-                # Save the uploaded file
-                with open(filename, 'wb') as f:
-                    for chunk in uploaded_file.chunks():
-                        f.write(chunk)
-                return restore_backup(filename, request)
+                return  restore_backup(filename, request)
             else:
                 return HttpResponse(json.dumps({
                     'error': 400,
