add a backup command

This commit is contained in:
Ted Unangst 2020-09-02 17:47:18 -04:00
parent 333006817e
commit 8c1c442491
3 changed files with 13 additions and 4 deletions

View File

@ -2,6 +2,8 @@ changelog
=== next
++ backup command.
+ Option to mention all in replies.
+ Reduce interference between various text substitution rules.

View File

@ -124,6 +124,10 @@ The
command exists to purge old data, by default 30 days.
This removes unreferenced, unsaved posts and attachments.
It does not remove any original content.
.Pp
Backups may be performed by running
.Ic backup dirname .
Backups only include the minimal necessary information.
.Ss Upgrade
Stop the old honk process.
Backup the database.
@ -132,10 +136,6 @@ Perform the upgrade with the
command.
Restart.
.Pp
There's also a
.Pa blob.db
file which is important to backup and restore.
.Pp
The current version of the honk binary may be printed with the
.Ic version
command.

View File

@ -326,6 +326,13 @@ func main() {
}
name := args[1]
unplugserver(name)
case "backup":
if len(args) < 2 {
fmt.Printf("usage: honk backup dirname\n")
return
}
name := args[1]
svalbard(name)
case "ping":
if len(args) < 3 {
fmt.Printf("usage: honk ping from to\n")