Index: /branches/amp_4_0/platform/config/init_db.sql
===================================================================
--- /branches/amp_4_0/platform/config/init_db.sql	(revision 2673)
+++ /branches/amp_4_0/platform/config/init_db.sql	(working copy)
@@ -344,7 +344,8 @@
     time             TIME        NOT NULL,
     day_of_the_week  integer DEFAULT NULL,
     day_of_the_month integer DEFAULT NULL,
-    month            integer DEFAULT NULL CHECK (month BETWEEN 1 AND 12)
+    month            integer DEFAULT NULL CHECK (month BETWEEN 1 AND 12),
+    destination varchar(64) DEFAULT NULL
 );
 
 -- Create a remote_storage table
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py	(revision 2673)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/access.py	(working copy)
@@ -5,7 +5,8 @@
 
 from hive.imports.model import *
 from hive.model.base import ANModel
-from hive.model.fields.builtin import BooleanField, PortField, CLITextField, UnionField, GroupField, ImportLocalFileField, URLField, TextField, EnumField, AssoField2, CharField
+from hive.model.fields.builtin import BooleanField, PortField, CLITextField, UnionField, GroupField, \
+    ImportLocalFileField, URLField, TextField, EnumField, AssoField2, CharField
 from hive.model.action import Action
 from hive.model.fields import FieldGroup, EmptyValueCondition, NonemptyValueCondition, BASIC, ValueCondition
 from hive.model.manager import QueryingGroups, UpdatingFields, CLIManager
@@ -67,10 +68,8 @@
 
     class Manager(CLIManager):
         def _get_query_set(self):
-            ret = {}
-            self._model._meta.mark_delay_query(ret)
-            data = QuerySet(self._model, [ret])
-            return data
+            ret = AccessControl()
+            return [ret]
 
         @QueryingGroups(['webui_settings'])
         def _get_webui_settings(self):
@@ -178,15 +177,14 @@
                                   RegexParser('admin aaa method (?P<method>RADIUS|TAC_X)', MATCHONE, reflags=re.S),
                                   RegexParser('admin aaa authorize (?P<enable_aaa_authorize>on|off)', MATCHONE,
                                               reflags=re.S))
-            rtn_dict = {
-                'enable_aaa': True if result[0]['enable_aaa'] == 'on' else False,
-                'priority': result[1]['priority'] if result[1] else '0',
-                'method': result[2]['method'] if result[2] else '',
-                'enable_aaa_authorize': True if result[3]['enable_aaa_authorize'] == 'on' else False,
-            }
-            self._model._meta.mark_delay_query(rtn_dict)
+            rtn_dict = AdminAAASettings(enable_aaa=True if result[0]['enable_aaa'] == 'on' else False,
+                                        priority=result[1]['priority'] if result[1] else '0',
+                                        method=result[2]['method'] if result[2] else '',
+                                        enable_aaa_authorize=True if result[3][
+                                                                         'enable_aaa_authorize'] == 'on' else False,
+                                        )
 
-            return QuerySet(self._model, [rtn_dict])
+            return [rtn_dict]
 
         def _update_enable_aaa_authorize(self, instance):
             self.cli.set_config()
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py	(revision 2673)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/cm/models/system/license.py	(working copy)
@@ -136,29 +136,32 @@
                 expire_time = datetime.datetime.strptime(exp_str, '%b %d %Y').strftime(
                     "%Y-%m-%d") if exp_str != "Permanent" else "Permanent"
 
-            data = {
-                'license_key': output[0]['license_key'] if output[0] else '',
-                'serial_num': output[1]['serial_num'],
-                'device_num': output[2]['device_num'] if output[2] else 0,
-                'adc_num': output[4]['adc_num'] if output[4] else 0,
-                'vpn_num': output[5]['vpn_num'] if output[5] else 0,
-                'waf_num': output[6]['waf_num'] if output[6] else 0,
-                'vpn_lic_sess': output[7]['vpn_lic_sess'] if output[7]['vpn_lic_sess'] != "No Limitation" else 99999999,
-                'expiration_data': expire_time,
-                'status': ''
-            }
-            if data['expiration_data']:
-                data['status'] = 'Normal'
-                if data['expiration_data'] != 'Permanent':
-                    exp_time = datetime.datetime.strptime(expire_time, '%Y-%m-%d')
+            license_inst = License(
+                license_key=output[0]['license_key'] if output[0] else '',
+                serial_num=output[1]['serial_num'],
+                device_num=int(output[2]['device_num']) if output[2] else 0,
+                adc_num=int(output[4]['adc_num']) if output[4] else 0,
+                vpn_num=int(output[5]['vpn_num']) if output[5] else 0,
+                waf_num=int(output[6]['waf_num']) if output[6] else 0,
+                vpn_lic_sess=int(output[7]['vpn_lic_sess']) if output[7] and output[7][
+                    'vpn_lic_sess'] != "No Limitation" else 99999999,
+                expiration_data=expire_time,
+                status=''
+            )
+
+            # Set the status field on the model
+            if license_inst.expiration_data:
+                license_inst.status = 'Normal'
+                if license_inst.expiration_data != 'Permanent':
+                    exp_time = datetime.datetime.strptime(license_inst.expiration_data, '%Y-%m-%d')
                     now = datetime.datetime.now() + datetime.timedelta(days=-1)
                     result = exp_time - now
                     if result.days < 0:
-                        data['status'] = 'Expiration'
+                        license_inst.status = 'Expiration'
                     elif result.days < 30:
-                        data['status'] = 'Warning'
+                        license_inst.status = 'Warning'
 
-            return QuerySet(self._model, [data])
+            return [license_inst]
 
         def _update_license_key(self, instance):
             self.cli.set_config()
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(revision 2673)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(working copy)
@@ -266,10 +266,10 @@
             }), content_type='application/json', status=405)
 
     except ge.GenericError as e:
-        oper_log('error', 'system', e.message)
+        oper_log('error', 'system', str(e))
         return ge.handle_exception(e)
     except Exception as e:
-        message = str(e.message).replace("'", "")
+        message = str(e).replace("'", "")
         oper_log('error', 'system', 'Exception during backup or restore.,  details: {}'.format(message))
         message = 'Exception while creating backup or restoring backup.,  details: {}'.format(message)
         raise ge.GenericError(500, message)
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(revision 2673)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(working copy)
@@ -83,7 +83,7 @@
     except Exception as e:
         backup_cron_logger.error("Schedule Backup failed! " + str(e))
         oper_log('error', 'system', "Exception while creating scheduled backup.")
-        message = 'Exception while creating scheduled backup,  details: {}'.format(e.message)
+        message = 'Exception while creating scheduled backup,  details: {}'.format(e)
         raise ge.GenericError(500, message)
 
 
@@ -168,6 +168,7 @@
     if input is not None:
         p = subprocess.Popen(cmd,
                              shell=True,
+                             text=True,
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
@@ -176,6 +177,7 @@
     else:
         p = subprocess.Popen(cmd,
                              shell=True,
+                             text=True,
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE,
                              close_fds=True,
