The problem occurs when a file already exists, and when copied with this command the new file is renamed to astra.conf.1. So this new file is not usable. It is necessary to delete the existing file with one script first and then copy it with the other one.
Try this one