Initiating a VAMI backup of vCenter fails with below error.
VMware vCenter 8.x
SftpStorageIOLib.py python script was altered. This script is located under /usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/
/var/log/vmware/applmgmt/applmgmt.log
YYYY-MM-DD HH:MM:SS:MS [40931]ERROR: backupRestoreAPI: Error loading dispatch plugin: unindent does not match any outer indentation level (SftpStorageIOLib.py, line 97)Traceback (most recent call last) :File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/util/Common.py", line 393, in loadDispatchPluginmodule = importlib. import_module ('plugins. backupRestoreDispatch' )File "/usr/lib/python3.10/importlib/_init _. py", line 126, in import_modulereturn bootstrap. gcd_import (name [level: ], package, level)File "<frozen importlib._ bootstrap>", line 1050, in gcd_importFile "<frozen importlib. bootstrap>", line 1027, in find and loadFile "<frozen importlib._bootstrap>",line 1006, in find_and_load_unlockedFile "<frozen importlib._bootstrap>"load_unlockedFile "<frozen importlib._bootstrap_external>", line 883, in exec_moduleFile "<frozen importlib._bootstrap>", line 241, in_call_with_frames_removedFile "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/backupRestoreDispatch.py", line 25, in <module>from .StorageIOLibFactory import CreateStorageI0ObjectFile "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/StorageIOLibFactory.py", line 9, in <module>from .SftpStorageIOLib import SftpStorageIOFile "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/SftpStorageIOLib.py", line 97if self.validateCerts: ^IndentationError: unindent does not match any outer indentation level
SSH to vCenter Server Appliance.
1. Move the SftpStorageIOLib.py to tmp directory.cd /usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/
mv SftpStorageIOLib.py /tmp
2. Copy the SftpStorageIOLib.py script from a working vCenter to the above path using WinSCP.
3. Restart the applmgmt service using command: service-control --restart applmgmt
4. Proceed with the backup via VAMI
Note: The file SftpStorageIOLib.py attached to this article is from vCenter 8.0 Update 3d 24322831 (8.0.3.00400)