diff --git a/tcp_tests/managers/backup_restore_manager.py b/tcp_tests/managers/backup_restore_manager.py
index 365ff6f..4665eb8 100644
--- a/tcp_tests/managers/backup_restore_manager.py
+++ b/tcp_tests/managers/backup_restore_manager.py
@@ -153,31 +153,37 @@
     # #################Backup_Restore_Glance###################
 
     def copy_glance_images_to_backup(self, path_to_backup,
-                                     tgt="I@glance:server and *01*"):
+                                     tgt="ctl03"):
         cmd = 'cp -a /var/lib/glance/images/. {}'.format(path_to_backup)
-        return self.salt_api.enforce_state(
-            tgt, 'cmd.run', cmd)
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        return self.execute_command(step, 'Copy glance images to backup')
+
+    def get_image_uud(self, tgt='ctl03'):
+        cmd = (". /root/keystonercv3; "
+               "openstack image list -c ID|  awk 'NR==4'| cut -d '|' -f 2")
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        res = self.execute_command(step, 'Get uuid of image on fs',
+                                   return_res=True)
+        return res
+
+    def delete_image_from_fs(self, uuid, tgt="ctl03"):
+        cmd = ('cd /var/lib/glance/images/; rm {}'.format(uuid))
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        self.execute_command(step, 'Delete image before restore')
 
     def copy_glance_images_from_backup(self, path_to_backup,
-                                       tgt="I@glance:server and *01*"):
+                                       tgt="ctl03"):
         cmd = 'cp -a {}/. /var/lib/glance/images/'.format(path_to_backup)
-        return self.salt_api.enforce_state(
-            tgt, 'cmd.run', cmd)
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        return self.execute_command(step, 'Copy to glance')
 
-    def check_images_after_backup(self, tgt="I@keystone:client"):
-        # TODO If the context of the Glance
-        # images files is lost, run the following commands:
-        # salt -C 'I@glance:server' cmd.run
-        # "chown glance:glance <IMAGE_FILE_NAME>"
-        # salt -C 'I@glance:server' cmd.run "chmod 640 <IMAGE_FILE_NAME>"
-        cmd = '. /root/keystonercv3; openstack image list'
-        return self.salt_api.enforce_state(tgt, 'cmd.run', cmd)
+    def check_image_on_fs(self, uuid, tgt="ctl03"):
+        cmd = ('ls /var/lib/glance/images/ | grep {}'.format(uuid))
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        self.execute_command(step, 'Check image exists after restore')
 
-    # #################Backup_Restore_cinder_volumes_and_snapshots###
-    # TODO Verify that a complete backup was created on
-    # the MySQL Galera Database Master node
-    # ls /var/backups/mysql/xtrabackup/full
-    # TODO(tleontovich): add method to check needed configs
-    # TODO (tleontovich): check pillars
-    # TODO (tleontovich): check  backup is created, and
-    # restore restores
+    def check_image_after_backup(self, uuid, tgt="ctl03"):
+        cmd = ('. /root/keystonercv3; '
+               'openstack image save {} --file test'.format(uuid))
+        step = {'cmd': cmd, 'node_name': self.get_node_name(tgt)}
+        self.execute_command(step, 'Save image after backup')
diff --git a/tcp_tests/managers/execute_commands.py b/tcp_tests/managers/execute_commands.py
index ba12678..adb76dc 100644
--- a/tcp_tests/managers/execute_commands.py
+++ b/tcp_tests/managers/execute_commands.py
@@ -77,7 +77,7 @@
                 LOG.info(log_msg)
                 self.action_download(step)
 
-    def execute_command(self, step, msg):
+    def execute_command(self, step, msg, return_res=None):
         # Required fields
         cmd = step.get('cmd')
         node_name = step.get('node_name')
@@ -102,6 +102,8 @@
                     msg + retry_msg, '=' * len(msg + retry_msg)))
 
                 result = remote.execute(cmd, verbose=True)
+                if return_res:
+                    return result
 
                 # Workaround of exit code 0 from salt in case of failures
                 failed = 0
diff --git a/tcp_tests/tests/system/test_backup_restore.py b/tcp_tests/tests/system/test_backup_restore.py
index d63433b..d32f71c 100644
--- a/tcp_tests/tests/system/test_backup_restore.py
+++ b/tcp_tests/tests/system/test_backup_restore.py
@@ -24,7 +24,7 @@
     def test_backup_cfg_backupninja_rsync(
             self, underlay, config, openstack_deployed,
             salt_actions, show_step):
-        """Test add policy for Nova service
+        """Test backup restore master node
 
         Scenario:
             1. Prepare salt on hosts
@@ -70,3 +70,57 @@
         backup.ping_minions('cfg01')
 
         LOG.info("*************** DONE **************")
+
+
+class TestBackupVCP(object):
+    """Test class for testing backup restore of VCP nodes"""
+
+    def test_backup_restore_glance_images(
+            self, underlay, config, openstack_deployed,
+            salt_actions, show_step):
+        """Test backup restore glance images
+
+        Scenario:
+            1. Prepare salt on hosts
+            2. Setup controller nodes
+            3. Setup compute nodes
+            4. Copy the images to the backup destination
+            5. Get image file uuid on fs
+            6. Delete image on fs
+            7. Copy the images from the backup directory to the Glance folder
+            8. Verify if the restored Glance images are available
+            9. Download image from glance
+        """
+        backup = backup_restore_manager.BackupRestoreManager(
+                config=config, underlay=underlay, salt_api=salt_actions)
+        # STEP #1,2,3
+        show_step(1)
+        show_step(2)
+        show_step(3)
+
+        # STEP #4
+        show_step(4)
+        backup.copy_glance_images_to_backup(
+            path_to_backup='/srv/volumes/backup/')
+
+        # STEP #5
+        show_step(5)
+        uuid = backup.get_image_uud()['stdout'][0].rstrip()
+
+        # STEP #6
+        show_step(6)
+        backup.delete_image_from_fs(uuid)
+
+        # STEP #7
+        show_step(7)
+        backup.copy_glance_images_from_backup(
+            path_to_backup='/srv/volumes/backup/')
+
+        # STEP #8
+        show_step(8)
+        backup.check_image_on_fs(uuid)
+
+        # STEP #9
+        show_step(9)
+        backup.check_image_after_backup(uuid)
+        LOG.info("*************** DONE **************")
