view src/luan/modules/host/backup.luan @ 1567:349eef23a13c

lucene named backup
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 14 Nov 2020 20:05:07 -0700
parents 1a68fc55a80c
children
line wrap: on
line source
local Luan = require "luan:Luan.luan"
local error = Luan.error
local Io = require "luan:Io.luan"
local print = Io.print or error()
local uri = Io.uri or error()
local Hosting = require "luan:host/Hosting.luan"

if #{...} ~= 3 then
	Io.stderr.write "usage: luan luan:host/backup.luan domain password name\n"
	return
end

local domain, password, name = ...

local zip = Hosting.caller(domain).lucene_backup(password,name)
uri("file:backup.zip").write(zip)

print("backed up lucene from "..domain.." to backup.zip")