Logic Machine Forum
Backup spaceLynk and store to Fileshare - 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 spaceLynk and store to Fileshare (/showthread.php?tid=2175)



Backup spaceLynk and store to Fileshare - ralwet - 30.07.2019

Hi

Regarding to https://openrb.com/e-mail-backup-file-once-a-month-from-lm there is a nice example how to do automatic backups.

I'm using a SpaceLynk HW 3.0. Can I use this script on the SpaceLynk 1:1 to do backups? 

Additional, I would like to store the backup-file on a networkshare (smb) instead of sending it as a Mail-Attachement. Is this possible - respectively Is there a nice example anywhere too? Smile

Thank you!


RE: Backup spaceLynk and store to Fileshare - admin - 31.07.2019

SMB is not supported, you can use FTP instead.


RE: Backup spaceLynk and store to Fileshare - ralwet - 31.07.2019

(31.07.2019, 07:11)admin Wrote: SMB is not supported, you can use FTP instead.

Ok, Thanks for your reply. So I follow the instructions in this tread, where backup and upload to ftp is described:
https://forum.logicmachine.net/showthread.php?tid=396

This thread is from 2016. I'm wondering if the backup-process is still the same for spaceLynk HW3.0:

Code:
src = 'backup-' .. os.date('%Y.%m.%d_%H-%M') .. '.tar.gz'
dst = '/home/ftp/' .. src

os.execute('sh /lib/genohm-scada/web/general/backup.sh')
os.execute('cd /lib/genohm-scada/storage && tar -c -z -f ' .. dst .. ' ./')

....  upload to ftp ......

os.execute('cd /home/ftp && rm -rf backup_*')
os.execute('cd /lib/genohm-scada/storage && rm -rf user userlib.luas blockly.luas initscript.lua helpers.js genohm-scada.config filter*')

Can I still go with these backup-statements?


RE: Backup spaceLynk and store to Fileshare - Daniel - 31.07.2019

Backup is not HW related. In new firmware 2.4.0 there is option to backup additionally system part.


RE: Backup spaceLynk and store to Fileshare - ralwet - 31.07.2019

(31.07.2019, 11:46)Daniel. Wrote: Backup is not HW related.

Yes, of course. You're right. Actually I'm on FW 2.3.0. The new FW 2.4.0 will be installed soon Smile

(31.07.2019, 11:46)Daniel. Wrote: In new firmware 2.4.0 there is option to backup additionally system part.

Is there any documentation to do that on FW 2.4.0  by scripting in lua?


RE: Backup spaceLynk and store to Fileshare - Daniel - 31.07.2019

There is no point in automatic backup of system settings as they will not change. It is enough to do it once.


RE: Backup spaceLynk and store to Fileshare - ralwet - 31.07.2019

(31.07.2019, 12:36)Daniel. Wrote: There is no point in automatic backup of system settings as they will not change. It is enough to do it once.

Well, there are use cases:
Not only system-settings are backuped. Also modifications on my scripting, visualisation, etc. I'm a programmer and I do regulary modifications/updates on my scripts and system. So after mods, I have to make a backup. Sometimes i forget Dodgy  So automatic backup seems to be a great feature. I understand, that this  maybe is a "corner case". It has not to be on the Product-UI...