Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py	(revision 2512)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/cm/lib/postgres_db.py	(working copy)
@@ -566,6 +566,7 @@
             id SERIAL PRIMARY KEY,
             filename varchar(64) NOT NULL,
             status varchar(64) DEFAULT NULL,
+            destination varchar(64) DEFAULT NULL,
             time  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
         );
                           '''
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 2512)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/controller/backup_controller.py	(working copy)
@@ -97,12 +97,25 @@
 def schedule_backup(request):
     """ Handles user request to schedule backup """
     data = json.loads(request.body)
+    backup_target = data.get("backup_target")
+    if not backup_target:
+        return HttpResponse(json.dumps({
+            'error': 400,
+            'message': "Back up destination not specified. Please specify value for 'backup_target'"
+        }), content_type='application/json', status=400)
+
+    if not (backup_target == ServiceUtils.LOCAL or backup_target == ServiceUtils.REMOTE):
+        return HttpResponse(json.dumps({
+            'error': 400,
+            'message': "Incorrect value specified for 'backup_target'.",
+            'description': "Please use 'local' or 'remote' value for 'backup_target'"
+        }), content_type='application/json', status=400)
+
     frequency = data.get("frequency")
     time_str = data.get("time")
     day_of_the_week = data.get("day_of_the_week")
     day_of_the_month = data.get("day_of_the_month")
     month = data.get("month")
-
     if not frequency:
         return HttpResponse(json.dumps({
             'error': 400,
@@ -140,7 +153,7 @@
             'message': "Day of the month and month need to be specified as the frequency is yearly."
         }), content_type='application/json', status=400)
 
-    return schedule_backup_job(frequency, hours, minutes, day_of_the_week, day_of_the_month, month, request)
+    return schedule_backup_job(backup_target, frequency, hours, minutes, day_of_the_week, day_of_the_month, month, request)
 
 
 def get_schedule_backup_info(request):
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/backup_service.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/backup_service.py	(revision 2512)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/backup_service.py	(working copy)
@@ -7,6 +7,7 @@
 import sys
 import json
 import time
+import argparse
 
 sys.path.append('/ca/webui/htdocs/new/src')
 from cm.lib.libbasic_operation import oper_log
@@ -26,7 +27,7 @@
 # Configure Logging
 backup_logger = logging.getLogger("backup_logger")
 
-INSERT_BCKFILE_SQL_STR = """INSERT INTO backups (filename, status) VALUES('{}', '{}')"""
+INSERT_BCKFILE_SQL_STR = """INSERT INTO backups (filename, status, destination) VALUES('{}', '{}', '{}')"""
 UPDATE_BCKFILE_SQL_STR = """UPDATE backups SET status='{}' WHERE filename='{}'"""
 DELETE_BCKFILE_SQL_STR = """DELETE FROM backups WHERE filename='{}'"""
 
@@ -51,7 +52,7 @@
                 os.makedirs(TMP_BACKUP_DIR)
 
             backup_logger.info("Starting backup...")
-            self.update_backups_db(BACKUP_FILE, "Started", 'insert')
+            self.update_backups_db(BACKUP_FILE, "Started", 'insert', destination)
 
             # Backup InfluxDB
             backup_logger.info("Backing up InfluxDB...")
@@ -145,13 +146,13 @@
             e.message = 'Exception while creating backup,  details: {}'.format(e.message)
             raise ge.GenericError(500, e.message)
 
-    def update_backups_db(self, backup_filename, status, action):
+    def update_backups_db(self, backup_filename, status, action, destination=None):
         """ Updated the status for backup filename in DB """
         try:
             db = DB.get_connected_db()
             sql = ''
             if action == 'insert':
-                sql = INSERT_BCKFILE_SQL_STR.format(backup_filename, status)
+                sql = INSERT_BCKFILE_SQL_STR.format(backup_filename, status, destination)
 
             elif action == 'update':
                 sql = UPDATE_BCKFILE_SQL_STR.format(status, backup_filename)
@@ -193,12 +194,12 @@
         try:
 
             db = DB.get_connected_db()
-            fetch_backup_files_sql = 'SELECT filename, status, time FROM backups'
+            fetch_backup_files_sql = 'SELECT filename, status, destination, time FROM backups'
             data = db.fetchall(fetch_backup_files_sql)
 
             result = []
             if data:
-                key = ['filename', 'status', 'time']
+                key = ['filename', 'status', 'destination', 'time']
                 # Serialize the result
                 for each in data:
                     row_dict = dict(zip(key, each))
@@ -231,22 +232,20 @@
             db = DB.get_connected_db()
             fetch_backup_files_sql = 'SELECT status FROM backups'
             data = db.fetchall(fetch_backup_files_sql)
+            db.close()
 
             if data:
                 key = ['status']
                 result = [dict(zip(key, each)) for each in data]
-            else:
-                result = None
 
-            if any(row.get('status') == 'In-progress' for row in result):
-                return HttpResponse(json.dumps({"status": "In-progress",
-                                                "details": "Currently a Backup is in progress"}),
-                                    content_type="application/json")
-            else:
-                return HttpResponse(json.dumps({"status": "Completed",
-                                                "details": "No Backup in progress!"}),
+                if any(row.get('status') == 'In-progress' for row in result):
+                    return HttpResponse(json.dumps({"status": "In-progress",
+                                                    "details": "Currently a Backup is in progress"}),
+                                        content_type="application/json")
+
+            return HttpResponse(json.dumps({"status": "Completed",
+                                            "details": "No Backup in progress!"}),
                                     content_type="application/json")
-            db.close()
         except Exception as e:
             oper_log('error', 'system', "Exception while fetching backup status.")
             message = str(e.message).replace("'", "")
@@ -258,5 +257,10 @@
 
 
 if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description="Backup Service")
+
+    parser.add_argument('--backup_target', help='Backup target', default='local')
+    args = parser.parse_args()
+
     backup = BackupConfig()
-    backup.perform_backup()
\ No newline at end of file
+    backup.perform_backup(destination=args.backup_target)
\ No newline at end of file
Index: /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py
===================================================================
--- /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(revision 2512)
+++ /branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/schedule_backup.py	(working copy)
@@ -24,7 +24,7 @@
 backup_cron_logger.addHandler(file_handler)
 
 
-def schedule_backup_job(frequency, hours, minutes, day_of_the_week, day_of_the_month, month, request):
+def schedule_backup_job(backup_target, frequency, hours, minutes, day_of_the_week, day_of_the_month, month, request):
     """ Schedules the backup job """
     try:
         # Persist Backup Schedule data in DB
@@ -74,7 +74,8 @@
 
         # Setup Cron Job
         backup_job = cron_time + (' export DJANGO_SETTINGS_MODULE=djproject.settings && '
-                                  '/usr/bin/python /ca/webui/htdocs/new/src/hive/services/backup_service.py')
+                                  '/usr/bin/python /ca/webui/htdocs/new/src/hive/services/backup_service.py'
+                                  ' --backup_target {}'.format(backup_target))
         deploy_cron_job(backup_job)
 
         return HttpResponse(json.dumps({"message": "Backup schedule updated successfully!", "cron_time": cron_time}),
@@ -188,7 +189,7 @@
     """ Deploys the scheduled backup job details """
     try:
         db = DB.get_connected_db()
-        fetchall_sql = '''SELECT * FROM backup_schedule'''
+        fetchall_sql = '''SELECT frequency, time, day_of_the_month, day_of_the_week, month  FROM backup_schedule'''
         data = db.fetchall(fetchall_sql)
 
         if data:
@@ -196,8 +197,8 @@
             values = list(data[0])
 
             # Convert `datetime.time` to a string (HH:MM format)
-            if isinstance(values[2], datetime.time):
-                values[2] = values[2].strftime("%H:%M")  # Convert to HH:MM string
+            if isinstance(values[1], datetime.time):
+                values[1] = values[1].strftime("%H:%M")  # Convert to HH:MM string
 
             result = dict(zip(key, values))
         else:
