Copied changes made in the server to the actual script.

Started if then statments for the deletion of the backup on server side.