k8up-io / wrestic

Restic Backup Kubernetes and OpenShift Wrapper - Part of K8up
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

[Question] wrestic failed to backup after first init. #104

Closed jim3ma closed 2 years ago

jim3ma commented 3 years ago

Describe the bug

After wrestic backups successfully, the following backups alway failed.

Logs

I0821 16:14:45.604511     218 main.go:43] wrestic "level"=0 "msg"="Wrestic Version: v0.3.2-dirty"
I0821 16:14:45.605822     218 main.go:44] wrestic "level"=0 "msg"="Operator Build Date: Fri Jul 30 12:58:49 UTC 2021"
I0821 16:14:45.605864     218 main.go:45] wrestic "level"=0 "msg"="Go Version: go1.16.6"
I0821 16:14:45.605870     218 main.go:46] wrestic "level"=0 "msg"="Go OS/Arch: linux/amd64"
I0821 16:14:45.605879     218 main.go:212] wrestic "level"=0 "msg"="setting up a signal handler"
I0821 16:14:45.606308     218 command.go:57] wrestic/RepoInit/command "level"=0 "msg"="restic command"  "args"=["init"] "path"="/usr/local/bin/restic"
I0821 16:14:45.606462     218 command.go:83] wrestic/RepoInit/command "level"=0 "msg"="Defining RESTIC_PROGRESS_FPS"  "frequency"=0.016666666666666666
E0821 16:14:45.630673     218 logging.go:122] wrestic/RepoInit/restic "msg"="Fatal: create repository at rest:http://admin:***@rclone-rest.k8up-operator.svc:8080/ failed: Fatal: config file already exists" "error"="error during command"
E0821 16:14:45.633118     218 logging.go:122] wrestic/RepoInit/restic "msg"="" "error"="error during command"
E0821 16:14:45.633258     218 main.go:82] wrestic "msg"="failed to initialise the repository" "error"="cmd.Wait() err: 1"

Expected behavior

Backups success.

To Reproduce

Steps to reproduce the behavior:

Create two backups, first is ok, second failed.

apiVersion: backup.appuio.ch/v1alpha1
kind: Backup
metadata:
  name: backup-test
spec:
  failedJobsHistoryLimit: 2
  successfulJobsHistoryLimit: 2
#  promURL: http://minio:9000
  backend:
    repoPasswordSecretRef:
      name: restic-secret
      key: password
    rest:
      url: http://admin:x@rclone-rest.k8up-operator.svc:8080
      userSecretRef:
        name: rclone-rest
        key: username
      passwordSecretReg:
        name: rclone-rest
        key: password

Environment (please complete the following information):

Kidswiss commented 2 years ago

PLEASE NOTE: THIS REPOSITORY HAS BEEN ARCHIVED.

wrestic has been merged into K8up 2.0 and is available as k8up restic command.