Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Error "Failed to calculate VCDB size" during backup in vCenter Server Appliance 6.0/6.5 (76134)

Last Updated: 10/15/2020Categories: TroubleshootingTotal Views: 8130Language:
English

2 like this article

Subscribe to get an email
newsletter with new updates

2 people found this helpful Please provide article feedback:

Symptoms

Attempting to backup the VCSA using the VAMI file-based backup and restore mechanism result in an error:

Timeout failed to complete in 72000 seconds.

In the var/log/vmware/applmgmt/backup.log, you will see message similar to:

2019-09-20T11:40:03.605 [MainProcess:PID-10287] INFO: Executing command: ['/opt/vmware/vpostgres/current/bin/psql', '-U', 'postgres', '-d', 'VCDB', '-p', '5432', '-t', '-A', '-c', "SELECT nspname, relname, reltuples AS row_count, pg_catalog.pg_table_size(C.oid) AS table_size, 100.0 * pg_catalog.pg_table_size(C.oid) / sum(pg_catalog.pg_table_size(C.oid)) over () AS percentage FROM pg_catalog.pg_class C LEFT JOIN pg_catalog.pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') AND C.relkind = 'r' AND C.relname !~ '^vpx_hist_stat' AND C.relname !~ '^vpx_sample_time' AND C.relname !~ '^vpx_event' AND C.relname !~ '^vpx_task' AND C.relname !~ '^vpx_topn' AND C.relname !~ '^vpxv_hist_stat' AND C.relname !~ '^vpxv_event' ORDER BY table_size DESC"].
2019-09-20T11:40:03.682 [MainProcess:PID-10287] INFO: Sample table size record: vc|vpx_text_array|7.73666e+06|4694687744|80.8458111497648330
2019-09-20T11:40:03.682 [MainProcess:PID-10287] INFO: Sample table: name="vc.vpx_text_array",
Rows count: 7.73666e+06
size="4694687744",
percent="80.8458111497648330%".
2019-09-20T11:40:03.682 [MainProcess:PID-10287] ERROR: Failed to calculate VCDB size.
Traceback (most recent call last):
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 398, in VCDBSize
original_size = _estimate_size_partial_vcdb(db_name='VCDB')
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 301, in _estimate_size_partial_vcdb
int(reltuples),
ValueError: invalid literal for int() with base 10: '7.73666e+06'
.
.
.
2019-09-20T11:40:03.291 [MainProcess:PID-10286] ERROR: Failed to calculate VCDB size.
Traceback (most recent call last):
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 398, in VCDBSize
original_size = _estimate_size_partial_vcdb(db_name='VCDB')
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 301, in _estimate_size_partial_vcdb
int(reltuples),
ValueError: invalid literal for int() with base 10: '7.73666e+06'
.
.
.
2019-09-20T12:10:46.197 [VCDBBackup:PID-11966] ERROR: Failed to backup VCDB.
Traceback (most recent call last):
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 1951, in BackupVCDB
args.dispatch, full_db_file)
File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py", line 1119, in _full_database_backup
status)
util.Common.BackupRestoreError: Failed to dispatch full database files.
Underlying process status. rc: 255

Note: Reviewing the logs, we can see the following errors, indicating that there was an issue calculating table size:(Note the tables referenced, may be different to the ones highlighted in this example).

The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Cause

The backup file does an SQL query for row count, but uses an int rather than a bigint, which means if the row count is above a certain value, number conversion fails, which terminates the query and causes the backup to timeout and fail.

Resolution

This issue is resolved in vCenter Server Appliance 6.7P01.

Workaround

To workaround this issue:

SSH into the vCenter Server Appliance.

Take a back up of the file, run the command:

cp /usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py /some/backup/path/for/original

Modify the file below as outlined:

/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/components/VCDB.py

Locate the line below in the VCDB.py file and modify it as outlined below:

from:
sql = ('SELECT nspname, relname, reltuples AS row_count, ...

Change to:
sql = ('SELECT nspname, relname, reltuples::bigint AS row_count, '...

Run the backup manually to confirm the fix.

If you want to monitor the backup progress, then run the following command to review the backup log live:

tail -f /var/log/vmware/applmgmt/backup.log

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
加入済みデバイスでリモート セッションを開始する際に、Workspace ONE UEM コンソールにエラー「デバイスの登録チェックに失敗しました」が表示される (75059)

KB
•
NSX-T ESXi 传输节点升级失败 (75131)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-4 of 4

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vCenter Server Appliance

Related Versions:

VMware vCenter Server Appliance 6.5.x

VMware vCenter Server Appliance 6.0.x

Take Our Survey

Support Assistant