Mercurial Hosting > luan
annotate blog/src/private/tools/backup.luan @ 603:862d6bb8124c
start version 0.13
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 10 Nov 2015 06:20:08 -0700 |
parents | cb6c628de583 |
children | ca169567ce07 |
rev | line source |
---|---|
597 | 1 local Io = require "luan:Io" |
2 local Http = require "luan:http/Http" | |
3 local Db = require "site:/lib/Db" | |
4 | |
5 | |
6 return function() | |
7 local backup = Io.uri "site:/private/local/backup.zip" | |
8 backup.delete() | |
9 Db.backup(backup.to_string()) | |
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 |