![]() |
backup to FTP every night -sdcard - 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: backup to FTP every night -sdcard (/showthread.php?tid=5749) |
backup to FTP every night -sdcard - domotiqa - 20.11.2024 Hi, just a question. I was questionning about doing backup everyday to our ftp of our customer. Can it be a SDcard killer? Here some part of our script with archive creation and cleaning file. Code: -- prepare files for backup RE: backup to FTP every night -sdcard - admin - 20.11.2024 Your script is outdated, use this: https://kb.logicmachine.net/scripting/backup-file-email-ftp/ RE: backup to FTP every night -sdcard - domotiqa - 20.11.2024 ok. your so quick :-)) So with this scipt no problem to backup everyday because there is still a temp file created, no ? path = 'backups/LM-' .. os.date('%Y-%m-%d') .. '.zip' or backups/ are in memory ? EDIT: my mistake path are remote folder RE: backup to FTP every night -sdcard - khalil - 29.01.2025 (20.11.2024, 08:40)admin Wrote: Your script is outdated, use this: https://kb.logicmachine.net/scripting/backup-file-email-ftp/ Hello Admin Is it possible to set a master password to the .zip exported file? RE: backup to FTP every night -sdcard - admin - 29.01.2025 Replace: Code: data = webrequest('general', 'backup') With: Code: data = webrequest('general', 'backup', { RE: backup to FTP every night -sdcard - khalil - 30.01.2025 many thanks admin RE: backup to FTP every night -sdcard - khalil - 02.02.2025 Hello Dears I create a scheduled script for automatic backup. But I find the recent backup created with 0kb size! why could this issue happened while I didn't get any error result. RE: backup to FTP every night -sdcard - admin - 03.02.2025 Log what webrequest and ftp.put return: Code: webrequest = require('webrequest') RE: backup to FTP every night -sdcard - khalil - 03.02.2025 Hello Admin, Both return same result Code: * arg: 1 Please note that this issue happened once not always, but I want to be notified if the backup generated with 0KB. I will try and If I succeed reproducing the case I will send you the log result RE: backup to FTP every night -sdcard - khalil - 03.02.2025 Hello Admin, I tried several times to replicate the issue but unfortunately I couldn't. could I use the this line of code if err for notification if this issue happened again Code: type(data) == 'string' and #data or 'error', err RE: backup to FTP every night -sdcard - admin - 03.02.2025 Use this for error logging: Code: if type(data) ~= 'string' then |