Fix lastn

master
bel 2020-04-11 16:14:17 +00:00
parent 49a2f3a7bc
commit a163e921f2
1 changed files with 8 additions and 6 deletions

14
main.go
View File

@ -66,12 +66,11 @@ func EnqueueBackups() {
return
}
conf := lastn.Config{
N: 3,
Rclone: "/dev/null",
Root: realpath,
Ns: "backups",
Store: "files",
Conf: realpath + "-backups",
N: 3,
Root: realpath,
Ns: "backups",
Store: "files",
StoreAddr: realpath + "-backups",
}
log.Printf("backups conf: %+v", conf)
lastn, err := lastn.New(conf)
@ -84,6 +83,9 @@ func EnqueueBackups() {
if err := lastn.Push(); err != nil {
log.Println("backup failed:", err)
}
if err := lastn.Clean(); err != nil {
log.Println("backup clean failed:", err)
}
for _ = range ticker.C {
log.Println("backing up...")
if err := lastn.Push(); err != nil {