diff src/luan/modules/host/restore.luan @ 775:1a68fc55a80c

simplify dir structure
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 26 Aug 2016 14:36:40 -0600
parents core/src/luan/modules/host/restore.luan@1a101ac9ea46
children 349eef23a13c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/luan/modules/host/restore.luan	Fri Aug 26 14:36:40 2016 -0600
@@ -0,0 +1,19 @@
+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/restore.luan domain password\n"
+	return
+end
+
+local domain, password = ...
+
+local zip_file = uri("file:backup.zip")
+zip_file.exists() or error "backup.zip not found"
+Hosting.caller(domain).lucene_restore(password,zip_file)
+
+print("restored lucene from backup.zip to "..domain)