How can we change the backup tar.gz file name from the defaults which is " backup-(year).(month).(day),(hour).(min).(seconds).tar.gz"

The reason is we would like to move all the backup tar.gz's from the servers to a centralized file share and for ex. since we have multiple message-processors and around 40 different servers we would like know which tar.gz is from which server and for which componenet.....and also to find

Ideally we prefer hostname and component name embedded to the default tar.gz.

1 4 270
4 REPLIES 4

Not applicable
@ravi.nomula the name of the file can by anything. You will need to rename the file after it is created. There is no option for specifying the name of the file.

Not applicable


I think the ask is reasonable but as @Maudrit mentioned, it is recommended to rename after they are created and not to touch any of the files in the lib as the upgrades will overwrite the changes unless you maintain the changes in a version source control.

Just tried on a local machine and sharing my observations. If you still want to change (nothing is stopping you from changing), you can do the below:

change the line

tarball=backup-$(date +%Y.%M.%d,%H.%M.%S).tar.gz

to tarball=`hostname -i`.backup-$(date +%Y.%M.%d,%H.%M.%S).tar.gz in the /opt/apigee/apigee-service/lib/actions/backup

cc @Stephen Gilson @Maudrit

Modifying the script is possible, but the customer will need to remember to do that modification after patches and upgrade. So, it may not be the best option.

Not applicable

An alternative approach to keep different hosts backups organized will be to use symbolic link. You can create symlink to point /opt/apigee/backup on a particular host to /<volume where backups will be stored>/host/backup

Symlink should not be impacted by patches and upgrades.