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
#6
Try this, you need 2023 firmware for it to work. Change variables in the first 4 lines as needed.

Code:
host = 'FTP_SERVER_IP'
user = 'username'
pass = 'password'
path = 'backup-' .. os.date('%Y-%m-%d') .. '.zip'

ftp = require('socket.ftp')
ltn12 = require('ltn12')
webrequest = require('webrequest')
data = webrequest('general', 'backup')

res, err = ftp.put({
  host = host,
  user = user,
  password = pass,
  argument = path,
  source = ltn12.source.string(data)
})

if not res then
  log('ftp upload failed: ' .. tostring(err))
end
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

Forum Jump: