The Samba-Bugzilla – Attachment 18592 Details for
Bug 15661
Online backup fails when smb over tcp is missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to enable no_sysvol option
backup.py.diff (text/plain), 2.09 KB, created by
Thomas Karlsson
on 2025-03-03 20:39:46 UTC
(
hide
)
Description:
Patch to enable no_sysvol option
Filename:
MIME Type:
Creator:
Thomas Karlsson
Created:
2025-03-03 20:39:46 UTC
Size:
2.09 KB
patch
obsolete
>--- backup.py.git 2025-03-01 21:21:12.617989232 +0000 >+++ backup.py 2025-03-02 15:33:13.882178378 +0000 >@@ -246,10 +246,13 @@ > choices=["tdb", "mdb"], > help="Specify the database backend to be used " > "(default is %s)" % get_default_backend_store()), >+ Option("--no-sysvol", action="store_true", default=False, >+ help="Exclude sysvol from the backup created"), >+ > ] > > def run(self, sambaopts=None, credopts=None, server=None, targetdir=None, >- no_secrets=False, backend_store=None): >+ no_secrets=False, backend_store=None, no_sysvol=False): > logger = self.get_logger() > logger.setLevel(logging.DEBUG) > >@@ -282,15 +285,16 @@ > new_sid = get_sid_for_restore(remote_sam, logger) > realm = remote_sam.domain_dns_name() > >- # Grab the remote DC's sysvol files and bundle them into a tar file >- logger.info("Backing up sysvol files (via SMB)...") >- sysvol_tar = os.path.join(tmpdir, 'sysvol.tar.gz') >- smb_conn = smb_sysvol_conn(server, lp, creds) >- backup_online(smb_conn, sysvol_tar, remote_sam.get_domain_sid()) >- >- # remove the default sysvol files created by the clone (we want to >- # make sure we restore the sysvol.tar.gz files instead) >- shutil.rmtree(paths.sysvol) >+ if not no_sysvol: >+ # Grab the remote DC's sysvol files and bundle them into a tar file >+ logger.info("Backing up sysvol files (via SMB)...") >+ sysvol_tar = os.path.join(tmpdir, 'sysvol.tar.gz') >+ smb_conn = smb_sysvol_conn(server, lp, creds) >+ backup_online(smb_conn, sysvol_tar, remote_sam.get_domain_sid()) >+ >+ # remove the default sysvol files created by the clone (we want to >+ # make sure we restore the sysvol.tar.gz files instead) >+ shutil.rmtree(paths.sysvol) > > # Edit the downloaded sam.ldb to mark it as a backup > samdb = SamDB(url=paths.samdb, session_info=system_session(), lp=lp,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15661
:
18339
|
18364
|
18592
|
18614