I think this looks pretty good. Only one quibble (apart from the indentation) is that you have a message
echo "Warning: found a backup for ${name} but original file still exist; please check its status and configuration; backup is available at \`${backup}'"
but it looks to me as if the backup file will be deleted shortly after this. I don't know how much it is worth complicating things to handle this edge case on an edge case but this contradiction should be resolved somehow I think (maybe just don't do anything silently if the original file is still there?)
I think this looks pretty good. Only one quibble (apart from the indentation) is that you have a message
echo "Warning: found a backup for ${name} but original file still exist; please check its status and configuration; backup is available at \`${backup}'"
but it looks to me as if the backup file will be deleted shortly after this. I don't know how much it is worth complicating things to handle this edge case on an edge case but this contradiction should be resolved somehow I think (maybe just don't do anything silently if the original file is still there?)