Cohesity Cloud Scale Technology Deployment Guide Using Terraform for AWS

Last Published:
Product(s): NetBackup & Alta Data Protection (11.0)

Changing database server password in PostgreSQL (AWS)

Using the LAMBDA_ARN function, you can change the database password. This can be obtained from the lambda function on the AWS console. The ARN stands for Amazon Resource Name.

Note:

When setting the PostgreSQL password in DBaaS, ensure that the password does not contain the following special characters: equal (=), double quote ("), single quote ('), percentage (%), at sign (@), ampersand (&), question mark (?), underscore (_), and hash (#)

To change the database server password

  1. To change the database server password, use the lambda function LAMBDA_ARN.

    $ aws lambda invoke --function-name $LAMBDA_ARN \ --cli-binary-format raw-in-base64-out --payload '{"password":"$NEW_PASSWORD"}' \ response_file

    Note:

    NEW_PASSWORD is the new password to be used.

  2. To obtain the POSTGRESQL_ID (database identifier) of your RDS Postgres database from the RDS database page of the AWS console, use the following command and wait for the database to be available.

    $ aws rds wait db-instance-available --db-instance-identifier $POSTGRESQL_ID

  3. Restart the primary pod using the command:

    $ kubectl get --namespace "${NAMESPACE}" primaryserver -o jsonpath='{.items[0].status.attributes.resourceName}'

    $ kubectl rollout restart "statefulset/${PRIMARY}" --namespace "${NAMESPACE}"

    In the above command:

    • NAMESPACE is the namespace containing your NetBackup deployment.

    • PRIMARY is the name of primary pod's stateful set.

For resetting the password for containerized PostgreSQL database, refer to the section Changing database server password in DBaaS from the guide NetBackup™ Deployment Guide for Kubernetes Clusters