comparison 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
comparison
equal deleted inserted replaced
774:3e30cf310e56 775:1a68fc55a80c
1 local Luan = require "luan:Luan.luan"
2 local error = Luan.error
3 local Io = require "luan:Io.luan"
4 local print = Io.print or error()
5 local uri = Io.uri or error()
6 local Hosting = require "luan:host/Hosting.luan"
7
8 if #{...} ~= 2 then
9 Io.stderr.write "usage: luan luan:host/restore.luan domain password\n"
10 return
11 end
12
13 local domain, password = ...
14
15 local zip_file = uri("file:backup.zip")
16 zip_file.exists() or error "backup.zip not found"
17 Hosting.caller(domain).lucene_restore(password,zip_file)
18
19 print("restored lucene from backup.zip to "..domain)