Mercurial Hosting > luan
annotate blog/src/private/tools/backup.luan @ 754:1a101ac9ea46
add lucene restore
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 17 Jul 2016 19:21:52 -0600 |
parents | 558740169005 |
children |
rev | line source |
---|---|
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
597
diff
changeset
|
1 local Io = require "luan:Io.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
597
diff
changeset
|
2 local Http = require "luan:http/Http.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
597
diff
changeset
|
3 local Db = require "site:/lib/Db.luan" |
597 | 4 |
5 | |
6 return function() | |
7 local backup = Io.uri "site:/private/local/backup.zip" | |
8 backup.delete() | |
751
558740169005
improve file delete()
Franklin Schmidt <fschmidt@gmail.com>
parents:
693
diff
changeset
|
9 Db.backup(backup) |
597 | 10 |
11 Io.stdout = Http.response.text_writer() | |
12 %> | |
13 <html> | |
14 <body> | |
15 backed up to <a href="/private/local/backup.zip">/private/local/backup.zip</a> | |
16 </body> | |
17 </html> | |
18 <% | |
19 end |