Mercurial Hosting > luan
diff core/src/luan/modules/host/backup.luan @ 749:85f5444fb7d4
add rcp lucene backup
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 15 Jul 2016 01:18:01 -0600 |
parents | |
children | f172f1dff4b6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/src/luan/modules/host/backup.luan Fri Jul 15 01:18:01 2016 -0600 @@ -0,0 +1,18 @@ +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 #{...} ~= 2 then + Io.stderr.write "usage: luan luan:host/update.luan domain password\n" + return +end + +local domain, password = ... + +local zip = Hosting.caller(domain).lucene_backup(password) +uri("file:backup.zip").write(zip) + +print("backed up lucene from "..domain.." to backup.zip")