Skip to content
Permalink
Browse files

Add backup database command

  • Loading branch information...
Raggaer committed Feb 23, 2019
1 parent d4c72e6 commit 080d52c56abbe840bd67c010a09601279f099307
Showing with 12 additions and 0 deletions.
  1. +1 −0 README.md
  2. +11 −0 command.go
@@ -40,6 +40,7 @@ You can use the `help` command while a database is opened to view the list of co
- `show` Shows an entry from the current working group
- `search` Searches entries (by title) from the current working group
- `save` Saves the database to disk
- `backup` Backups the database file
- `xx` Clears the clipboard

## Deleting groups and entries
@@ -15,6 +15,17 @@ type command struct {
}

var commands = []command{
{
Key: "backup",
Fn: func(args []string) {
if err := backupDatabase(); err != nil {
fmt.Println("Unable to backup database:")
fmt.Println(err.Error())
}
},
Help: "Backups the database file. The new backup is saved as yyyy-mm-dd_hh:ii:ss_name.kdbx",
HelpSmall: "Backups the database file. The new backup is saved as yyyy-mm-dd_hh:ii:ss_name.kdbx",
},
{
Key: "save",
Fn: func(args []string) {

0 comments on commit 080d52c

Please sign in to comment.
You can’t perform that action at this time.