benbjohnson / litestream

Streaming replication for SQLite.
https://litestream.io
Apache License 2.0
11.12k stars 256 forks source link

[Maybe Bug] Can't list generations of rclone s3 server #532

Closed diyism closed 11 months ago

diyism commented 11 months ago

My /etc/litestream.yml:

dbs:
  - path: /home/user_cmd/diyism_com.sqlite
    replicas:
      - name: rclone
        type: s3
        endpoint: http://127.0.0.1:8081
        bucket: rclone_serve_s3
        path:   diyism_com.sqlite
        access-key-id: none
        secret-access-key: none

I started litestream: litestream replicate

And I create some new tables into /home/user_cmd/diyism_com.sqlite, and I can see "litesteram replicate" logs: time=2023-12-10T14:58:28.077Z level=INFO msg="sync: new generation" db=/home/user_cmd/diyism_com.sqlite generation=de9922c3ce88155a reason="no generation exists"

And I can see more and more new files created in rclone s3 server: /rclone_serve_s3/diyism_com.sqlite/generations/de9922c3ce88155a/wal/: 00000001_00001038.wal.lz4 00000002_00001038.wal.lz4 00000003_00001038.wal.lz4 00000004_00001038.wal.lz4

But when I run "litestream generations /home/user_cmd/diyism_com.sqlite", it only shows titles without any generations listed: name generation lag start end

And When I run "litestream restore /home/user_cmd/diyism_com.sqlite", it complains: time=2023-12-10T16:07:06.972Z level=ERROR msg="failed to run" error="no matching backups found"

hifi commented 11 months ago

I tested rclone serve s3 /tmp/bucket and I could list generations successfully after replicating. I used the latest rclone from git.

diyism commented 11 months ago

I see, it should be rclone bug, I close this issue. Thanks.