This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Full Backup
#1
I just learned the hard way that my backup script doesn't make a backup off everything.
I'm missing the startup script, the user libraries and the common functions.

This is the script that is use to make the daily backup.
Is there a way to backup everything at once?

Code:
--Take a backup and ftp to NAS -- name of backup file src = 'backup-' .. os.date('%Y.%m.%d_%H-%M') .. '.tar.gz' -- where to put backup file on LM dst = '/home/ftp/' .. src -- where to put the backup on NAS target = 'Targetpath' .. src -- prepare files for backup os.execute('sh /lib/genohm-scada/web/general/backup.sh') -- create archive os.execute('cd /lib/genohm-scada/storage && tar -c -z -f ' .. dst .. ' ./') -- load the ftp support local ftp = require("socket.ftp") local ltn12 = require("ltn12") -- ftp to NAS f, e = ftp.put{   host = "IPadres",   user = "Username",   password = "Password",   type = "i",   argument = target,   source = ltn12.source.file(io.open(dst, "rb"))   } if (e) then   log (e)   log (f)   alert("Could not ftp: ", e, "\n") end log("ftp_backup")   -- cleanup 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*')
Reply


Messages In This Thread
Full Backup - by bednarekluc - 09.09.2023, 09:08
RE: Full Backup - by admin - 09.09.2023, 09:33
RE: Full Backup - by bednarekluc - 09.09.2023, 11:23
RE: Full Backup - by admin - 09.09.2023, 13:56
RE: Full Backup - by npinguin - 11.09.2023, 15:16
RE: Full Backup - by admin - 11.09.2023, 16:13
RE: Full Backup - by manos@dynamitec - 08.02.2024, 11:52
RE: Full Backup - by admin - 08.02.2024, 11:54
RE: Full Backup - by gtsamis - 06.03.2024, 23:25
RE: Full Backup - by admin - 07.03.2024, 07:01
RE: Full Backup - by EjvindHald - 02.03.2025, 19:10
RE: Full Backup - by admin - 03.03.2025, 07:34
RE: Full Backup - by tigi - 02.04.2025, 16:46
RE: Full Backup - by Daniel - 03.04.2025, 07:05
RE: Full Backup - by tigi - 03.04.2025, 09:12
RE: Full Backup - by admin - 03.04.2025, 09:14
RE: Full Backup - by tigi - 03.04.2025, 21:16
RE: Full Backup - by Erwin van der Zwart - 19.06.2025, 06:27
RE: Full Backup - by admin - 19.06.2025, 08:37

Forum Jump: