Adding logic into the backup to server script so that it can include pre/post execute hooks