We only overwrite the executable file for AdGuard to update it, all the other files of the tar don't matter. So there is no need at all to backup the temporary folder and then copy the files back, even simpler isn't it?