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 === next
++ backup command.
+ Option to mention all in replies. + Option to mention all in replies.
+ Reduce interference between various text substitution rules. + Reduce interference between various text substitution rules.

View File

@ -124,6 +124,10 @@ The
command exists to purge old data, by default 30 days. command exists to purge old data, by default 30 days.
This removes unreferenced, unsaved posts and attachments. This removes unreferenced, unsaved posts and attachments.
It does not remove any original content. 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 .Ss Upgrade
Stop the old honk process. Stop the old honk process.
Backup the database. Backup the database.
@ -132,10 +136,6 @@ Perform the upgrade with the
command. command.
Restart. Restart.
.Pp .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 The current version of the honk binary may be printed with the
.Ic version .Ic version
command. command.

View File

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