benbjohnson/litestream

Failing to replicate to S3

MYerouPaleBlue opened this issue · 2 comments

Hello,

I am using the Systemd service with a simple configuration to replicate to S3, but no object appears in the AWS console after I enable the service.

My /etc/litestream.yml configuration:

access-key-id: XYZ
secret-access-key: ABC

dbs:
  - path: /path/to/prod.sqlite
    replicas:
      - type: s3
        bucket: my.bucket
        path: prod.sqlite
        region: eu-central-1

I enabled the service using sudo systemctl start litestream.

Runnning sudo systemctl status litestream :

● litestream.service - Litestream
     Loaded: loaded (/lib/systemd/system/litestream.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-01-23 13:53:11 UTC; 26min ago
   Main PID: 1051369 (litestream)
      Tasks: 7 (limit: 9257)
     Memory: 4.7M
        CPU: 617ms
     CGroup: /system.slice/litestream.service
             └─1051369 /usr/bin/litestream replicate

Jan 23 13:53:11 ubuntu-4gb-80gb-20tb systemd[1]: Started Litestream.
Jan 23 13:53:11 ubuntu-4gb-80gb-20tb litestream[1051369]: litestream v0.3.9
Jan 23 13:53:11 ubuntu-4gb-80gb-20tb litestream[1051369]: initialized db: /path/to/prod.sqlite
Jan 23 13:53:11 ubuntu-4gb-80gb-20tb litestream[1051369]: replicating to: name="s3" type="s3" bucket="my.bucket" path="prod.sqlite" region="eu-central-1" endpoint="" sync-interval=1s

So there's no error message and everything seems to be working fine. But there's no object in the AWS Console and when I try to restore the database file (litestream restore -o ./prod.db /path/to/prod.sqlite) I get no matching backups found.

Is there any way I can see any error logs on what is going wrong? Thanks.

hifi commented

Is the path to the database correct? Litestream outputs nothing while waiting for the file to be created. Another possibility is that it can't see the file due to filesystem restrictions.

Thanks for your reply @hifi .

Embarrassingly, I had a typo in the path...

Thank you!