def collection_backup(collection_name, location, backup_name=None, **kwargs):
 if (not collection_exists(collection_name, **kwargs)):
  raise ValueError("Collection doesn't exists")
 if (backup_name is not None):
  backup_name = '&name={0}'.format(backup_name)
 else:
  backup_name = ''
 _query('{collection}/replication?command=BACKUP&location={location}{backup_name}&wt=json'.format(collection=collection_name, backup_name=backup_name, location=location), **kwargs)

def collection_backup ( collection_name , location , backup_name = None , ** kwargs ) : if ( not collection_exists ( collection_name , ** kwargs ) ) : raise ValueError ( "Collection doesn't exists" ) if ( backup_name is not None ) : backup_name = '&name={0}' . format ( backup_name ) else : backup_name = '' _query ( '{collection}/replication?command=BACKUP&location={location}{backup_name}&wt=json' . format ( collection = collection_name , backup_name = backup_name , location = location ) , ** kwargs )
create a backup for a collection .