Error: "vcloud DB backup failed" when attempting to take a backup of the Cloud Director appliance
search cancel

Error: "vcloud DB backup failed" when attempting to take a backup of the Cloud Director appliance

book

Article ID: 431855

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • When attempting to take a manual backup of the cloud director appliance using the command:

    /opt/vmware/appliance/bin/create-backup.sh

    The command fails with "vcloud DB backup failed"

  • In the /opt/vmware/var/log/backup.log of you see entries similar to:

    pg_dump: dumping contents of table "public.job_steps"
    pg_dump: dumping contents of table "public.jobs"
    pg_dump: error: Dumping the contents of table "jobs" failed: PQgetCopyData() failed.
    pg_dump: error: Error message from server: server closed the connection unexpectedly
            This probably means the server terminated abnormally
            before or while processing the request.
    pg_dump: error: The command was: COPY public.jobs (job_id, job_type, operation, status, object, starttime, stoptime, admin_details, user_details, ui_admin_message, ui_user_message, debug, admin_major_error_code, user_major_error_code, minor_error_code, object_type, object_id, thread_id, cell_instance_id, cell_name, root_job_id, parent_job_id, user_id, org_id, operation_full, object_type_full, user_name, org_name, progress, cancel_requested, locale, pre_processor_entity_id, pre_processor_entity_type, pre_processor_name, org_member_id, external_object_id, external_object_href, service_name, vendor_specific_error_code, result, subprovider_details, ui_subprovider_message) TO stdout;
    2026-03-01 13:25:40 | create-backup.sh | [ERROR] vcloud DB backup failed.

Environment

VMware Cloud Director 10.6.X

Cause

This issue can occur due to the large growth in the size of the jobs table in the cloud director database.

To confirm the current size of the jobs table please perform the following:

  1. SSH to the current Primary Cell for Cloud Director:

    SSH root@<VCD_FQDN>

  2. Connect to the Cloud Director Database:

    sudo -i -u postgres psql vcloud

  3. Run the following select statement to verify the current size of the jobs table in the database:

    SELECT pg_size_pretty (pg_total_relation_size('jobs')) size;

Resolution

This issue is resolved by reducing the "Log History to Keep" from 90 days by default down to 1 day in the Cloud Director provider portal, this will remove jobs that have been completed from the cloud director database after 24 hours:

  1. Login to the Cloud Director provider portal
  2. Navigate to Administration > Settings > General
  3. Under Activity Log Select Edit
  4. Reduce the "Log History to Keep" to 1 Day 
  5. Select Save to confirm the change.
  6. After 24 to 48 hours check the size of the jobs table again to verify that the size has reduced.

Additional Information

For more information on the Log History to Keep please see: General VMware Cloud Director System Settings

Cloud Director アプライアンスのバックアップ取得試行時に "vcloud DB backup failed" エラーが発生する