From bac58df23a32d8da332fbe585334cc099b3f7480 Mon Sep 17 00:00:00 2001 From: SMo Date: Thu, 27 Nov 2025 09:07:33 +0100 Subject: [PATCH 01/20] sync --- .idea/.gitignore | 3 +++ .idea/core.iml | 14 ++++++++++++++ .idea/inspectionProfiles/Project_Default.xml | 12 ++++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 6 files changed, 49 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/core.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..26d33521af --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/core.iml b/.idea/core.iml new file mode 100644 index 0000000000..7a6134d11f --- /dev/null +++ b/.idea/core.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..1b893a9d8d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000..105ce2da2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..402ffa7e2b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From b330d56cb2f05901c54389eb831de22e1e103f0f Mon Sep 17 00:00:00 2001 From: SMo Date: Thu, 27 Nov 2025 09:21:51 +0100 Subject: [PATCH 02/20] Update Samba upload to modern SMB2/SMB3 connection Switch SMB connection from outdated NetBIOS/SMB1 (port 139) to direct TCP (port 445) Enable is_direct_tcp=True in SMBConnection for proper SMB2/3 support Remove dependency on NetBIOS session setup Improve security and compatibility with modern Samba/Windows servers Allow raising min protocol in smb.conf to SMB2 or SMB3 Refactor port handling and logging accordingly This update modernizes the backup upload mechanism and removes reliance on deprecated SMB1. --- .../backup_clouds/samba/backup_cloud.py | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 398c5d01f6..5fb7f9a8bb 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -29,6 +29,47 @@ def is_port_open(host: str, port: int): def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, backup_file: bytes) -> None: + # SMB über Port 445 nutzen (kein SMB1/NetBIOS mehr) + SMB_PORT = 445 + + conn = SMBConnection( + config.smb_user, + config.smb_password, + os.uname()[1], + config.smb_server, + use_ntlm_v2=True, + is_direct_tcp=True + ) + + found_invalid_chars = re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path) + host_is_reachable = is_port_open(config.smb_server, SMB_PORT) + + if found_invalid_chars: + log.warning("Ungültige Zeichen im Pfad: {}".format(found_invalid_chars.group())) + log.warning("Sicherung nicht erfolgreich.") + send_file = False + else: + send_file = True + + if host_is_reachable and conn.connect(config.smb_server, SMB_PORT) and send_file: + log.info("SMB-Verbindung über Port 445 erfolgreich.") + full_file_path = os.path.join(config.smb_path, backup_filename) + + log.info(f"Backup nach //{config.smb_server}/{config.smb_share}/{full_file_path}") + + try: + conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) + except Exception as error: + log.error(str(error).split('\n')[0]) + log.error("Freigabe oder Unterordner existiert möglicherweise nicht.") + finally: + conn.close() + + elif send_file: + log.warning("SMB Verbindungsaufbau nicht möglich.") + else: + log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT} nicht erreichbar.") + conn = SMBConnection(config.smb_user, config.smb_password, os.uname()[1], config.smb_server, use_ntlm_v2=True) found_invalid_chars = re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path) host_is_reachable = is_port_open(config.smb_server, 139) From 7192b8d8006428f161abd296890ed461f10a8566 Mon Sep 17 00:00:00 2001 From: SMo Date: Tue, 2 Dec 2025 16:34:57 +0100 Subject: [PATCH 03/20] =?UTF-8?q?SMB-Upload=20=C3=BCberarbeitet:=20zuerst?= =?UTF-8?q?=20SMB2/3,=20bei=20Fehlschlag=20Fallback=20auf=20SMB1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backup_clouds/samba/backup_cloud.py | 106 +++++++++--------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 5fb7f9a8bb..3a139dd313 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -29,72 +29,76 @@ def is_port_open(host: str, port: int): def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, backup_file: bytes) -> None: - # SMB über Port 445 nutzen (kein SMB1/NetBIOS mehr) - SMB_PORT = 445 + SMB_PORT_445 = 445 + SMB_PORT_139 = 139 + + # Pfad prüfen + if re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path): + log.warning("Ungültige Zeichen im Pfad.") + log.warning("Sicherung nicht erfolgreich.") + return + + # ------------------------------------------------------------ + # 1) SMB2/3 über Port 445 testen + # ------------------------------------------------------------ + if is_port_open(config.smb_server, SMB_PORT_445): + conn = SMBConnection( + config.smb_user, + config.smb_password, + os.uname()[1], + config.smb_server, + use_ntlm_v2=True, + is_direct_tcp=True + ) + + if conn.connect(config.smb_server, SMB_PORT_445): + try: + log.info("SMB-Verbindung über Port 445 erfolgreich.") + full_file_path = f"{config.smb_path.rstrip('/')}/{backup_filename}" + log.info(f"Backup nach //{config.smb_server}/{config.smb_share}/{full_file_path}") + + conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) + + return + except Exception as error: + log.error(str(error).split('\n')[0]) + log.error("Freigabe oder Unterordner existiert möglicherweise nicht.") + finally: + conn.close() + else: + log.warning("SMB-Verbindungsaufbau über Port 445 nicht möglich.") + else: + log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT_445} nicht erreichbar.") + + # ------------------------------------------------------------ + # 2) Fallback: SMB1 über Port 139 + # ------------------------------------------------------------ + if not is_port_open(config.smb_server, SMB_PORT_139): + log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT_139} nicht erreichbar.") + return conn = SMBConnection( config.smb_user, config.smb_password, os.uname()[1], config.smb_server, - use_ntlm_v2=True, - is_direct_tcp=True + use_ntlm_v2=True ) - found_invalid_chars = re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path) - host_is_reachable = is_port_open(config.smb_server, SMB_PORT) - - if found_invalid_chars: - log.warning("Ungültige Zeichen im Pfad: {}".format(found_invalid_chars.group())) - log.warning("Sicherung nicht erfolgreich.") - send_file = False - else: - send_file = True - - if host_is_reachable and conn.connect(config.smb_server, SMB_PORT) and send_file: - log.info("SMB-Verbindung über Port 445 erfolgreich.") - full_file_path = os.path.join(config.smb_path, backup_filename) - - log.info(f"Backup nach //{config.smb_server}/{config.smb_share}/{full_file_path}") - + if conn.connect(config.smb_server, SMB_PORT_139): try: + log.info("SMB Verbindungsaufbau über Port 139 erfolgreich.") + full_file_path = f"{config.smb_path.rstrip('/')}/{backup_filename}" + log.info(f"Backup nach //{config.smb_server}/{config.smb_share}/{full_file_path}") + conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) except Exception as error: log.error(str(error).split('\n')[0]) - log.error("Freigabe oder Unterordner existiert möglicherweise nicht.") + log.error("Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden.") finally: conn.close() - - elif send_file: - log.warning("SMB Verbindungsaufbau nicht möglich.") - else: - log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT} nicht erreichbar.") - - conn = SMBConnection(config.smb_user, config.smb_password, os.uname()[1], config.smb_server, use_ntlm_v2=True) - found_invalid_chars = re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path) - host_is_reachable = is_port_open(config.smb_server, 139) - - if found_invalid_chars: - log.warning("Folgenden ungültige Zeichen im Pfad gefunden: {}".format(found_invalid_chars.group())) - log.warning("Sicherung nicht erfolgreich.") - send_file = False else: - send_file = True - - if host_is_reachable and conn.connect(config.smb_server, 139) and send_file: - log.info("SMB Verbindungsaufbau erfolgreich.") - full_file_path = config.smb_path + backup_filename if config.smb_path is not None else backup_filename - log.info("Backup nach //" + config.smb_server + '/' + config.smb_share + '/' + full_file_path) - try: - conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) - except Exception as error: - log.error(error.__str__().split('\n')[0]) - log.error("Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden.") - conn.close() - elif send_file: - log.warning("SMB Verbindungsaufbau fehlgeschlagen.") - elif not host_is_reachable: - log.warning("Host {} und/oder Port 139 nicht zu erreichen.".format(config.smb_server)) + log.warning("SMB Verbindungsaufbau über Port 139 fehlgeschlagen.") def create_backup_cloud(config: SambaBackupCloud): From 53bfd3666073935e1d522a01b73ab7cb1aafd6f3 Mon Sep 17 00:00:00 2001 From: SMo Date: Tue, 2 Dec 2025 18:29:16 +0100 Subject: [PATCH 04/20] fix whitespace --- packages/modules/backup_clouds/samba/backup_cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 3a139dd313..d29e9e8abc 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -107,4 +107,4 @@ def updater(backup_filename: str, backup_file: bytes): return updater -device_descriptor = DeviceDescriptor(configuration_factory=SambaBackupCloud) +device_descriptor = DeviceDescriptor(configuration_factory=SambaBackupCloud) \ No newline at end of file From c630f42e83a46a3b2d33b6b716c9a80825ba3c37 Mon Sep 17 00:00:00 2001 From: SMo Date: Tue, 2 Dec 2025 18:35:26 +0100 Subject: [PATCH 05/20] fix Whitespace --- packages/modules/backup_clouds/samba/backup_cloud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index d29e9e8abc..d97d974ba3 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -59,7 +59,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) - return + return except Exception as error: log.error(str(error).split('\n')[0]) log.error("Freigabe oder Unterordner existiert möglicherweise nicht.") @@ -107,4 +107,4 @@ def updater(backup_filename: str, backup_file: bytes): return updater -device_descriptor = DeviceDescriptor(configuration_factory=SambaBackupCloud) \ No newline at end of file +device_descriptor = DeviceDescriptor(configuration_factory=SambaBackupCloud) From 78c1849c31ad86a639aa1e6991475d300ea5fb69 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:12:51 +0100 Subject: [PATCH 06/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index d97d974ba3..8871b1a136 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -93,8 +93,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) except Exception as error: - log.error(str(error).split('\n')[0]) - log.error("Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden.") + raise Exception("Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden."+str(error).split('\n')[0]) finally: conn.close() else: From 3662337a8f49fded1ef9d57ebd3097a1347424f7 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:13:27 +0100 Subject: [PATCH 07/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 8871b1a136..fb3b7bcdb7 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -61,8 +61,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b return except Exception as error: - log.error(str(error).split('\n')[0]) - log.error("Freigabe oder Unterordner existiert möglicherweise nicht.") + raise Exception("Freigabe oder Unterordner existiert möglicherweise nicht. "+str(error).split('\n')[0]) finally: conn.close() else: From b87ead69fdb9942dd6e7978e8dc1ffab585882cd Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:13:34 +0100 Subject: [PATCH 08/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index fb3b7bcdb7..d5cf9a78e8 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -67,7 +67,6 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b else: log.warning("SMB-Verbindungsaufbau über Port 445 nicht möglich.") else: - log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT_445} nicht erreichbar.") # ------------------------------------------------------------ # 2) Fallback: SMB1 über Port 139 From 623d6033a7885d3436e595c86c593cd9287f6247 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:14:04 +0100 Subject: [PATCH 09/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index d5cf9a78e8..fb5aa85819 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -65,7 +65,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b finally: conn.close() else: - log.warning("SMB-Verbindungsaufbau über Port 445 nicht möglich.") + raise Exception("SMB-Verbindungsaufbau über Port 445 nicht möglich.") else: # ------------------------------------------------------------ From dc2047a94f523682095168e491f5a997010f60c7 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:14:10 +0100 Subject: [PATCH 10/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index fb5aa85819..a5d2d880f5 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -95,7 +95,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b finally: conn.close() else: - log.warning("SMB Verbindungsaufbau über Port 139 fehlgeschlagen.") + raise Exception("SMB Verbindungsaufbau über Port 139 fehlgeschlagen.") def create_backup_cloud(config: SambaBackupCloud): From c6c9d5fc42d09ab8879bd69a5234966fd8060d6d Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:14:27 +0100 Subject: [PATCH 11/20] Update packages/modules/backup_clouds/samba/backup_cloud.py Co-authored-by: LKuemmel <76958050+LKuemmel@users.noreply.github.com> --- packages/modules/backup_clouds/samba/backup_cloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index a5d2d880f5..f1fad6943a 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -72,8 +72,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b # 2) Fallback: SMB1 über Port 139 # ------------------------------------------------------------ if not is_port_open(config.smb_server, SMB_PORT_139): - log.warning(f"Host {config.smb_server} und/oder Port {SMB_PORT_139} nicht erreichbar.") - return + raise Exception((f"Host {config.smb_server} und/oder Port {SMB_PORT_139} und {SMB_PORT_445} nicht erreichbar.") conn = SMBConnection( config.smb_user, From 0f00193f4bf9d04e87ff6b750e1b1e7319d05f96 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:19:38 +0100 Subject: [PATCH 12/20] Delete .idea/.gitignore --- .idea/.gitignore | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d33521af..0000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml From 773b81cb96762a4607f51e5ae4bb2b524c925154 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:20:17 +0100 Subject: [PATCH 13/20] Delete .idea/core.iml --- .idea/core.iml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .idea/core.iml diff --git a/.idea/core.iml b/.idea/core.iml deleted file mode 100644 index 7a6134d11f..0000000000 --- a/.idea/core.iml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file From 42ed5700736557c024d9b176e787ef45cc12a254 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:20:46 +0100 Subject: [PATCH 14/20] Delete .idea/inspectionProfiles/Project_Default.xml --- .idea/inspectionProfiles/Project_Default.xml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 1b893a9d8d..0000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - \ No newline at end of file From 2082ec24b1a1cce8f24c4abcf5e9a11357c752e5 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:21:02 +0100 Subject: [PATCH 15/20] Delete .idea/inspectionProfiles/profiles_settings.xml --- .idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da2d..0000000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From 5e4658127ac5dd95cbf1e09761e3e8c881e7254e Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:21:21 +0100 Subject: [PATCH 16/20] Delete .idea/modules.xml --- .idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 402ffa7e2b..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 2ee01a4efed80fdab31d29811c91e32d702aa0b5 Mon Sep 17 00:00:00 2001 From: SMo <68300849+Sleepwalker86@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:21:39 +0100 Subject: [PATCH 17/20] Delete .idea/vcs.xml --- .idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbb..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 583f0084feabb613e6b6d544db739e42dcd18f2b Mon Sep 17 00:00:00 2001 From: SMo Date: Wed, 3 Dec 2025 10:15:05 +0100 Subject: [PATCH 18/20] Fallback korrigiert --- packages/modules/backup_clouds/samba/backup_cloud.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index f1fad6943a..2fb342ca64 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -66,13 +66,14 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b conn.close() else: raise Exception("SMB-Verbindungsaufbau über Port 445 nicht möglich.") - else: # ------------------------------------------------------------ # 2) Fallback: SMB1 über Port 139 # ------------------------------------------------------------ if not is_port_open(config.smb_server, SMB_PORT_139): - raise Exception((f"Host {config.smb_server} und/oder Port {SMB_PORT_139} und {SMB_PORT_445} nicht erreichbar.") + raise Exception( + f"Host {config.smb_server} und/oder Port {SMB_PORT_139} und {SMB_PORT_445} nicht erreichbar." + ) conn = SMBConnection( config.smb_user, From 0fe0302fd0ca2f2a6644a535b611e3286b991e09 Mon Sep 17 00:00:00 2001 From: SMo Date: Wed, 3 Dec 2025 10:18:55 +0100 Subject: [PATCH 19/20] fix Zeile zu lang --- packages/modules/backup_clouds/samba/backup_cloud.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 2fb342ca64..65c2bd19e5 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -91,7 +91,11 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b conn.storeFile(config.smb_share, full_file_path, io.BytesIO(backup_file)) except Exception as error: - raise Exception("Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden."+str(error).split('\n')[0]) + raise Exception( + "Möglicherweise ist die Freigabe oder ein Unterordner nicht vorhanden." + + str(error).split("\n")[0] + ) + finally: conn.close() else: From 08c6b0d3acfe38c5f12e1d38f25c0de6391ebef2 Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Wed, 3 Dec 2025 12:08:03 +0100 Subject: [PATCH 20/20] Update packages/modules/backup_clouds/samba/backup_cloud.py --- packages/modules/backup_clouds/samba/backup_cloud.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/modules/backup_clouds/samba/backup_cloud.py b/packages/modules/backup_clouds/samba/backup_cloud.py index 65c2bd19e5..49b1145343 100644 --- a/packages/modules/backup_clouds/samba/backup_cloud.py +++ b/packages/modules/backup_clouds/samba/backup_cloud.py @@ -34,9 +34,7 @@ def upload_backup(config: SambaBackupCloudConfiguration, backup_filename: str, b # Pfad prüfen if re.search(r'[\\\:\*\?\"\<\>\|]+', config.smb_path): - log.warning("Ungültige Zeichen im Pfad.") - log.warning("Sicherung nicht erfolgreich.") - return + raise Exception("Ungültige Zeichen im Pfad. Sicherung nicht erfolgreich.") # ------------------------------------------------------------ # 1) SMB2/3 über Port 445 testen