Current Ambari does not have any HA (High Availability) features, so it is important to backup the Ambari configuration in the following cases:
IMPORTANT NOTE: This procedure will only backup the Ambari server configuration settings. Ambari also has a backend database that should be backed up using the database vendors recommended settings.
How to backup Ambari settings
1. Run the command to backup the Ambari server configuration settings:
# ambari-server backup Using python /usr/bin/python Backing up Ambari File System state... *this will not backup the server database* Backup requested. No path specified. Will use /var/lib/ambari-server/Ambari_State_Backup.zip Backup process initiated. Creating zip file... Zip file created at /var/lib/ambari-server/Ambari_State_Backup.zip Backup complete. Ambari Server 'backup' completed successfully.
2. Copy the file /var/lib/ambari-server/Ambari_State_Backup.zip
to a safe location.
How to restore Ambari settings
1. Stop the Ambari server:
# ambari-server stop Using python /usr/bin/python Stopping ambari-server Ambari Server is not running
2. Restore the Ambari configuration settings:
# ambari-server restore ambari-server-backup/backup.zip Using python /usr/bin/python Restoring Ambari File System state Restore requested. Restore process initiated. Extracting the archive ambari-server-backup/backup.zip Restore complete. Ambari Server 'restore' completed successfully.
3. Restart the Ambari server:
# ambari-server start