benbjohnson / litestream

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

no .db file found in the replication server #606

Closed Nemos closed 2 months ago

Nemos commented 2 months ago

Hello, I am using litestream sftp replication with ssh keys and the yml configuration file as dbs:

mohammed90 commented 2 months ago

You will not see a single .db file at the server. You'll see a tree containing .lz4 files like this

$ tree test/
test/
└── generations
    └── f249fbbdece8354d
        ├── snapshots
        │   └── 00000000.snapshot.lz4
        └── wal
            ├── 00000000_00000000.wal.lz4
            ├── 00000000_00004080.wal.lz4
            ├── 00000000_00005098.wal.lz4
            ├── 00000000_000060b0.wal.lz4
            ├── 00000000_000070c8.wal.lz4
            ├── 00000001_00000000.wal.lz4
            ├── 00000001_00001038.wal.lz4
            ├── 00000001_00002050.wal.lz4
            ├── 00000001_00003068.wal.lz4
            ├── 00000001_00004080.wal.lz4
            ├── 00000001_00005098.wal.lz4
            └── 00000001_000060b0.wal.lz4

They can be used to assemble the .db file again when restored.

Nemos commented 2 months ago

Thank you mohammed, can I restore it to the same space as those files located ?

mohammed90 commented 2 months ago

Thank you mohammed, can I restore it to the same space as those files located ?

Kinda defeats the point of Litestream, but you'll have to run Litestream on the remote server with the restore command.

That said, you might be more interested in LiteFS.

Nemos commented 2 months ago

no db file is generated , although this will help a lot, you can always use restore command to "generate" the database where you like.