import firebirdsql.fbcore from firebirdsql import services def restore_database(fbk_file: str, fdb_file: str): con = services.connect(user='SYSDBA', password='masterkey') con.restore_database(fbk_file, fdb_file, pageSize=16384, replace=True ) def backup_database(fdb_file: str, fbk_file: str): con = services.connect(user='SYSDBA', password='masterkey') con.backup_database(fdb_file, fbk_file)