From aed0d2e5ebfa15a08f30dc1ebde584ad8722d055 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 23 Sep 2011 17:38:08 +1000 Subject: samba-tool: added --full-sync and --sync-all options to samba-tool drs replicate --- source4/scripting/python/samba/netcmd/drs.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/netcmd/drs.py b/source4/scripting/python/samba/netcmd/drs.py index e7a3cbfa08..78b998e0f5 100644 --- a/source4/scripting/python/samba/netcmd/drs.py +++ b/source4/scripting/python/samba/netcmd/drs.py @@ -276,12 +276,14 @@ class cmd_drs_replicate(Command): takes_options = [ Option("--add-ref", help="use ADD_REF to add to repsTo on source", action="store_true"), Option("--sync-forced", help="use SYNC_FORCED to force inbound replication", action="store_true"), + Option("--sync-all", help="use SYNC_ALL to replicate from all DCs", action="store_true"), + Option("--full-sync", help="resync all objects", action="store_true"), Option("--local", help="pull changes directly into the local database (destination DC is ignored)", action="store_true"), ] - def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False, local=False, - sambaopts=None, - credopts=None, versionopts=None, server=None): + def run(self, DEST_DC, SOURCE_DC, NC, + add_ref=False, sync_forced=False, sync_all=False, full_sync=False, + local=False, sambaopts=None, credopts=None, versionopts=None, server=None): self.server = DEST_DC self.lp = sambaopts.get_loadparm() @@ -325,6 +327,10 @@ class cmd_drs_replicate(Command): req1.options |= drsuapi.DRSUAPI_DRS_ADD_REF if sync_forced: req1.options |= drsuapi.DRSUAPI_DRS_SYNC_FORCED + if sync_all: + req1.options |= drsuapi.DRSUAPI_DRS_SYNC_ALL + if full_sync: + req1.options |= drsuapi.DRSUAPI_DRS_FULL_SYNC_NOW req1.source_dsa_guid = misc.GUID(source_dsa_guid) try: -- cgit