Generating database dump / Backing up Embedded postgres database on Aria Suite Lifecycle 8.x
search cancel

Generating database dump / Backing up Embedded postgres database on Aria Suite Lifecycle 8.x

book

Article ID: 386932

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

This article aims to provide steps to collected a database dump and backing up the embedded postgres DB in Aria Suite Lifecycle 8.x 

Environment

VMware Aria Suite Lifecycle 8.x 

Resolution

  • Log in to the VMware Aria Suite Lifecycle virtual appliance using SSH with root credentials. 
  • Change directory using this command:

    cd /tmp

  • Run this command to create a copy of the database in /tmp

su -m -c "/opt/vmware/vpostgres/11/bin/pg_dump -Fc vrlcm  > /tmp/vasl.sql" - postgres

  • Use SCP or WinSCP to transfer the vasl.sql file off of the appliance.

Note:

    • -Fc switch already provides a compressed file.  No need to bzip.
    • Upon execution of the above command you may receive a response with a "Permission Denied" alert, however, this is expected and can be ignored. The dump creation would have succeeded and you should be able to view it under /tmp/ directory. 
      Alert sample (You may receive either one or both of the below alerts, depending on the expiration status of the account of the postgres user):

Your account has expired; please contact your system administrator
su: Authentication token expired
(Ignored)
XX:XX:XX up X days, XX:XX,  X users,  load average: 0.XX, 0.XX, 0.XX
tdnf update info not available yet!
-su: /root/.bash_profile: Permission denied

    • If the dump isn't created in the /tmp/ directory when the "su: Authentication token expired" alert is prompted, validate the expiration status of the account of the postgres user with the command : chage -l postgres and extend the expiry if required.