ttionya / vaultwarden-backup

Backup vaultwarden (formerly known as bitwarden_rs) SQLite3/PostgreSQL/MySQL/MariaDB database by rclone. (Docker)
MIT License
1.1k stars 122 forks source link

storage system connection failure #151

Closed johnnycash69 closed 6 months ago

johnnycash69 commented 7 months ago

Hi,

I just installed vaultwarden-backup on my docker instance. I wanted to use an existing config file by using the command:

docker cp /home/pi/rclone.conf vaultwarden_backup:/config/rclone/

I checked the successfully copied file by using the command:

sudo cat /var/lib/docker/volumes/vaultwarden_rclone_data/_data/rclone/rclone.conf

I restarted the container and got the following error:

======================================== DATA_DIR: /data DATA_CONFIG: /data/config.json DATA_RSAKEY: /data/rsa_key DATA_ATTACHMENTS: /data/attachments DATA_SENDS: /data/sends

DB_TYPE: SQLITE DATA_DB: /data/db.sqlite3

CRON: 10 0 * RCLONE_REMOTE: vaultwarden_pi5_rclone: RCLONE_GLOBAL_FLAG: ZIP_ENABLE: TRUE ZIP_PASSWORD: 18 Chars ZIP_TYPE: zip BACKUP_FILE_DATEFORMAT: %Y%m%d%H%M (example "[filename].20240430_1235.[ext]") BACKUP_KEEP_DAYS: 30 MAIL_SMTP_ENABLE: FALSE TIMEZONE: Europe/Berlin

panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6e4c14] goroutine 1 [running]: time.(Timer).Stop(...) /usr/local/go/src/time/sleep.go:78 github.com/rclone/rclone/lib/oauthutil.(Renew).Shutdown.func1() /go/src/github.com/rclone/rclone/lib/oauthutil/renew.go:91 +0x24 sync.(Once).doSlow(0x40008bf8d8?, 0x38db6c?) /usr/local/go/src/sync/once.go:74 +0x100 sync.(Once).Do(...) /usr/local/go/src/sync/once.go:65 github.com/rclone/rclone/lib/oauthutil.(Renew).Shutdown(0x40004d40c0?) /go/src/github.com/rclone/rclone/lib/oauthutil/renew.go:90 +0x48 github.com/rclone/rclone/backend/pcloud.(Fs).Shutdown(0x378ab20?, {0x1d18c60?, 0x40008bf908?}) /go/src/github.com/rclone/rclone/backend/pcloud/pcloud.go:953 +0x20 github.com/rclone/rclone/fs/cache.createOnFirstUse.func1.1({0x1d18c60?, 0x40004d6140?}) /go/src/github.com/rclone/rclone/fs/cache/cache.go:30 +0x5c github.com/rclone/rclone/lib/cache.(Cache).Clear(0x40004d4090) /go/src/github.com/rclone/rclone/lib/cache/cache.go:243 +0xd8 github.com/rclone/rclone/fs/cache.Clear() /go/src/github.com/rclone/rclone/fs/cache/cache.go:195 +0x28 github.com/rclone/rclone/cmd.Run(0x1, 0x0, 0x37c3fe0, 0x40008bfc40) /go/src/github.com/rclone/rclone/cmd/cmd.go:325 +0x8e4 github.com/rclone/rclone/cmd/mkdir.init.func1(0x37c3fe0, {0x40000599c0, 0x1, 0x1d70b7f?}) /go/src/github.com/rclone/rclone/cmd/mkdir/mkdir.go:30 +0x120 github.com/spf13/cobra.(Command).execute(0x37c3fe0, {0x4000059980, 0x1, 0x1}) /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x828 github.com/spf13/cobra.(Command).ExecuteC(0x37ba780) /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344 github.com/spf13/cobra.(Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 github.com/rclone/rclone/cmd.Main() /go/src/github.com/rclone/rclone/cmd/cmd.go:563 +0x34 main.main() /go/src/github.com/rclone/rclone/rclone.go:14 +0x1c storage system connection failure [vaultwarden_pi5_rclone:]

DATA_DIR: /data DATA_CONFIG: /data/config.json DATA_RSAKEY: /data/rsa_key DATA_ATTACHMENTS: /data/attachments DATA_SENDS: /data/sends

DB_TYPE: SQLITE DATA_DB: /data/db.sqlite3

CRON: 10 0 * RCLONE_REMOTE: vaultwarden_pi5_rclone: RCLONE_GLOBAL_FLAG: ZIP_ENABLE: TRUE ZIP_PASSWORD: 18 Chars ZIP_TYPE: zip BACKUP_FILE_DATEFORMAT: %Y%m%d%H%M (example "[filename].20240430_1235.[ext]") BACKUP_KEEP_DAYS: 30 MAIL_SMTP_ENABLE: FALSE TIMEZONE: Europe/Berlin ========================================`

I'm using the latest rclone version 1.66.

`rclone v1.66.0

Any help is welcome.

johnnycash69 commented 7 months ago

Update: I just did a rollback to vaultwarden backup version 1.19.9 and everything works. So I guess the problem is caused by the latest update to version 1.19.10.

ttionya commented 6 months ago

It seems this is an issue with rclone. I suggest you report this issue to rclone. Once rclone is updated, we will update promptly.

johnnycash69 commented 1 month ago

This error persists after several updates of rclone and Vaultwarden Backup.

I believe the error is due to the RCLONE_REMOTE_DIR flag. There the value “/” works without problems up to version 1.19.9. Since then not anymore. I either leave the flag out or enter a value other than the default value.

Only works up to version 1.19.9: -e RCLONE_REMOTE_DIR= “/”

Since then, leave out the flag or fill it with a path other than “/”: -e RCLONE_REMOTE_DIR=“/backup/” \

Now the latest version of Vaultwarden Backup works again.