By default the backup file is created at /var/lib/ambari-server/ directory. I want it to go to any other location and the redirection operator of bash is not helping, nor is the help option of "ambari-server command" giving any hints.
Kindly note that am not looking PostGreSQL backup, which is the default backend of Ambari Server, but the entire Ambari Server as a whole, as is taken by the command "ambari-server backup" command.
Am looking for the entire ambari-server backup, not just the backend DB.
While running the "ambari-server backup" command if not path is specified then the following default PATH is choosen as per: https://github.com/apache/ambari/blob/release-2.6.1/ambari-server/src/main/python/ambari_server/Back...
# What to use when no path/archive is specified DEFAULT_ARCHIVE = AmbariPath.get("/var/lib/ambari-server/Ambari_State_Backup.zip")
So if you want to specify a custom PATH for ambari server backup then you will have to supply the path as well in the command argument as following. In this case the Backup will be created in the mentioned path "/tmp/Ambari-Backup.zip"
# ambari-server backup /tmp/Ambari-Backup.zip