Python3 code to backup telegram chat / channel history to files or republish in other channel
pyrogram - pip3 install pyrogram
_session_name = "xxxxxxxxxx"
_api_id = 1234
_api_hash = "xxxxxxxx"
_backup_chat_id = "xxxxxxxxxx"
Check all info in: https://docs.pyrogram.ml/pyrogram/Client