File-based backups of vCenter Server persist beyond the maximum retention limit if the communication protocol with the backup server is FTP.
search cancel

File-based backups of vCenter Server persist beyond the maximum retention limit if the communication protocol with the backup server is FTP.

book

Article ID: 419664

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

  • vCenter Server backups persist beyond the maximum retention limit.

    The limit for the number of backups to retain can be checked on the following screen:

    1. Log in to vCenter Server Management (VAMI).
    2. Click Backup in the left pane.
    3. Click Edit under Backup Schedule.
    4. Check the field labeled Number of backups to retain.
      In this example, the maximum retention limit for vCenter Server backups is 3.
  • The file-based backup protocol is FTP.
  • Checking the vCenter/sn_vcsa_fqdn directory on the FTP Server, backups are persisting beyond the retention limit.
    For instance, if the FTP Server is running on a Windows Server and if you run dir command under backup location, the output will look like the following. Each folder contains a vCenter Server backup, and in this case, we can see that 5 backups remain.
    2025/01/01  00:01    <DIR>          S_8.0.3.00000_20250101-000113_
    2025/01/02  00:01    <DIR>          S_8.0.3.00000_20250102-000116_
    2025/01/03  00:01    <DIR>          S_8.0.3.00000_20250103-000111_
    2025/01/04  00:01    <DIR>          S_8.0.3.00000_20250104-000111_
    2025/01/05  00:01    <DIR>          S_8.0.3.00000_20250105-000114_
    ...

    The command results may vary depending on your configuration, version, and other factors.

  • An UnboundLocalError is logged in the vCenter Server's backupScheduler.log. The backupScheduler.log is located under /var/log/vmware/applmgmt. A sample of the log is as follows:
    YYYY-MM-DDTHH:mm:SS.sss [0] [MainProcess:PID-####] [Scheduler::ExecArchiveList:Scheduler.py:119] ERROR: Failed to issue the Archive.list request. Exception: {messages : [LocalizableMessage(id='vapi.method.invoke.exception', default_message="Error in method invocation 'UnboundLocalError' object has no attribute 'errcode'", args=["'UnboundLocalError' object has no attribute 'errcode'"], params=None, localized=None)], data : None, error_type : INTERNAL_SERVER_ERROR}

Environment

VMware vCenter Server 7.x

VMware vCenter Server 8.x

Cause

The FTP Server contains non-ASCII characters in the backup directory.

The backup deletion job retrieves a list of directories on the remote server to find old backups. If this list includes file names or directories that can not be decoded with UTF-8, the deletion job may fail with an UnboundLocalError.

Resolution

There are two possible workarounds:

Option 1: Remove the file or directory that contains non-ASCII characters in its name.

Option 2: Change the backup directory to one that does not contain any files or directories with non-ASCII characters.

Backup deletion is executed daily by cron at 12:00 AM (midnight). After performing either Option 1 or Option 2, please wait until cron runs and verify whether the old backup directories have been successfully deleted.

Additional Information

This article addresses the issue of backup deletion failure; however, you may also encounter an issue where backups cannot be created successfully. For details on backup failure, please refer to vCenter Server's file based backup to FTP server failed due to "Internal error. See logs for details. https://***/appliance/support-bundle".