IT 이야기/네트워크(Network)
2024. 11. 30.
다수의 Cisco Switch Configuration Backup 을 위한 Python Script
import paramikofrom datetime import datetimeimport osimport getpassimport sysimport timeimport subprocessfrom concurrent.futures import ThreadPoolExecutor# 경로 설정current_directory = ( os.path.dirname(sys.executable) if getattr(sys, "frozen", False) else os.path.dirname(__file__))BACKUP_DIR = os.path.join(current_directory, "backup", "switch_configs")LOG_FILE = os.path.join(current_directory, "..