Mercurial Hosting > luan
comparison src/luan/modules/host/backup.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/backup.luan@f172f1dff4b6 |
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/backup.luan domain password\n" | |
10 return | |
11 end | |
12 | |
13 local domain, password = ... | |
14 | |
15 local zip = Hosting.caller(domain).lucene_backup(password) | |
16 uri("file:backup.zip").write(zip) | |
17 | |
18 print("backed up lucene from "..domain.." to backup.zip") |