Vertica backup failing with vbr.py showing "database name "drdata' not found in cluster" error
search cancel

Vertica backup failing with vbr.py showing "database name "drdata' not found in cluster" error

book

Article ID: 377320

calendar_today

Updated On:

Products

DX NetOps CA Performance Management - Usage and Administration

Issue/Introduction

When running the backup scripts for the Vertica DB, setup as per:

TechDocs : DX NetOps 23.3 : Configure the Data Repository Backup

the following warning is shown in the log:

localbackup]# cat backup.log

Error: Configured database name "drdata' not found in cluster. Available:
WARNING: The admin tools depend on your login shell being /bin/bash.
Your login shell is currently set to /bin/sh. If you continue to run the admintools
with this default shell you may experience technical difficulties. If you want to suppress this warning
please set suppress_shell_warning = True in Configuration section in admintools.conf.

Do you wish to continue? (Y/N)
please set suppress_shell_warning = True in Configuration section in admintools.conf.

Do you wish to continue? (Y/N)
drdata
Backup FAILED.

 

Cause

The problem is highlighted in the warning message:

WARNING: The admin tools depend on your login shell being /bin/bash. Your login shell is currently set to /bin/sh. If you continue to run the admin tools

If you look at the crontab(5) manpage, then by default the shell it executes commands with is /bin/sh, and this is what causes the warning because the Vertica adminTools utility needs  /bin/bash

Several environment variables are set up automatically by the cron(8) daemon. SHELL is set to /bin/sh, and LOGNAME and HOME are set from the /etc/passwd line of the crontab?s owner. HOME and SHELL may be over- ridden by settings in the crontab; LOGNAME may not.

 

Resolution

Set the shell to /bin/bash in the crontab by adding the SHELL definition as a line before your commands. For example:

SHELL=/bin/bash
5 0 * * * /opt/vertica/bin/vbr.py --task init --config-file /home/vertica/backup_restore_full_external.ini