Backup Ambari

You must back up the current Ambari database. It creates a copy of the current Ambari database and meta information.

  1. On the Ambari Server host, stop the original Ambari Server.
    ambari-server stop
  2. Stop Ambari Agent.
    Stop  Ambari Agent on all host
    ambari-agent stop
  3. Create a directory to hold the database backups.
    cd /tmp
    mkdir dbdumps/
    cd dbdumps/
  4. Create the database backups.

    POSTGRES

    pg_dump [AMBARI_DB_USERNAME] -U [AMBARI_DB_USERNAME] -f pre_upgrade.sql
    Password: [AMBARI_DB_PASSWORD]
    MYSQL
    mysqldump [AMBARI_DB_NAME] -u [AMBARI_DB_USERNAME] > pre_upgrade.sql 
    Variable Description Default
    [AMBARI_DB_NAME] The database name. ambari

    [AMBARI_DB_USERNAME]

    The database username.

    ambari

    [AMBARI_DB_PASSWORD]

    The database password.

    bigdata

  5. Create a backup of the Ambari properties.
    /etc/ambari-server/conf/ambari.properties
    /etc/ambari-agent/conf/ambari-agent.ini