git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5d4f474
)
samba-tool: added --full-sync and --sync-all options to samba-tool drs replicate
author
Andrew Tridgell
<tridge@samba.org>
Fri, 23 Sep 2011 07:38:08 +0000
(17:38 +1000)
committer
Andrew Tridgell
<tridge@samba.org>
Tue, 4 Oct 2011 04:08:56 +0000
(15:08 +1100)
source4/scripting/python/samba/netcmd/drs.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/netcmd/drs.py
b/source4/scripting/python/samba/netcmd/drs.py
index e7a3cbfa0818ce91c0f9e971079b0df092529b7a..78b998e0f560a9aed8dc25eb0a88626b74684332 100644
(file)
--- 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"),
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"),
]
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=Non
e,
- 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=Fals
e,
+
local=False, sambaopts=None,
credopts=None, versionopts=None, server=None):
self.server = DEST_DC
self.lp = sambaopts.get_loadparm()
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
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:
req1.source_dsa_guid = misc.GUID(source_dsa_guid)
try: