ertica backup failing with database name <dbname> not found error in crontab - Dx NetOps Performance Management
search cancel

ertica backup failing with database name <dbname> not found error in crontab - Dx NetOps Performance Management

book

Article ID: 377320

calendar_today

Updated On:

Products

Network Observability CA Performance Management

Issue/Introduction

When running the backup scripts for the Vertica DB, the following warning is shown in the log:

localbackup]# cat backup.log

Error: Configured database name "<db name>' 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