Logic Machine Forum
Sending Backup file to a chat_id in Telegram - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Sending Backup file to a chat_id in Telegram (/showthread.php?tid=4418)



Sending Backup file to a chat_id in Telegram - kike - 02.12.2022

Hi everyone!

I hope you can help me, 

I would like implement a telegram group, where several logicmachine are sending every week two messages:

1-. A report with the info of mem, proc and sys resources along the week ==> no problem with that, using the CSV sending script available in this forum is easy

2-. The backupfile, in this case I tried to make a "puzzle" with several script .... but ... with no success!! I can not find nor the info or a good way to do it. Some one can guide me? 

There is a function "sendDocument" in the telegram API but no idea how to use it to add the backup file. 

Thanks a lot in advance!!!

Kike


RE: Sending Backup file to a chat_id in Telegram - admin - 05.12.2022

You can install 2022 RC1 firmware and use webrequest library to create a backup: https://forum.logicmachine.net/showthread.php?tid=4425
Then send it using sendDocument by modifying this example: https://forum.logicmachine.net/showthread.php?tid=2792&pid=17944#pid17944


RE: Sending Backup file to a chat_id in Telegram - kike - 19.12.2022

(05.12.2022, 13:37)admin Wrote: You can install 2022 RC1 firmware and use webrequest library to create a backup: https://forum.logicmachine.net/showthread.php?tid=4425
Then send it using sendDocument by modifying this example: https://forum.logicmachine.net/showthread.php?tid=2792&pid=17944#pid17944

Done! It works!

Thanks! I realized that the buckup structure is quite diferent as used to be, I undestand that everything related to the way to access the database did not change, did it?

Thanks!!!


RE: Sending Backup file to a chat_id in Telegram - admin - 19.12.2022

There are no internal changes, just the backup format and backup directory/file layout.


RE: Sending Backup file to a chat_id in Telegram - kike - 19.12.2022

(19.12.2022, 09:50)admin Wrote: There are no internal changes, just the backup format and backup directory/file layout.

Okie Dokie, One more question ...

I checked out that there is a new directory with the filter tables coded  in two files, ga_ip and ga_tp.

Is there a way to "edit" that files? via script of FTp ar any other methood?

I looked for this info in the database but I could not find anything

Thanks a lot!!!!