Support Questions
Find answers, ask questions, and share your expertise

How do I redirect the backup file created by the command "ambari-server backup" to any location I want rather default one of /var/lib/ambari-server/?

New Contributor

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.



@Gautam Somani

Look at this backup process for postgress , its practically the same for MySQL only ,you will have to use mysql dump

New Contributor

Am looking for the entire ambari-server backup, not just the backend DB.

Super Mentor

@Gautam Somani

While running the "ambari-server backup" command if not path is specified then the following default PATH is choosen as per:

# What to use when no path/archive is specified
DEFAULT_ARCHIVE = AmbariPath.get("/var/lib/ambari-server/")


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-server backup /tmp/


; ;