Hey I'm having a bit of trouble getting the snapsh...
# community-help
s
Hey I'm having a bit of trouble getting the snapshot endpoint to actually save to specified path. I'm running docker compose it looks like this
Copy code
services:
  typesense:
    image: typesense/typesense:27.1
    restart: always
    ports:
      - "127.0.0.1:8108:8108"
    volumes:
      - ./typesense-data:/data
      - ./backups:/backups
    command:
      - --data-dir
      - /data
      - --api-key=${TYPESENSE_API_KEY}
      - --enable-cors
The typesense instance itself works fine, and if I jump into the docker shell I can see the backups directory mounted I call the snapshot endpoint, then I see the following my logs.
Copy code
I20250207 18:59:03.446450    74 raft_server.cpp:897] Triggering an on demand snapshot...
I20250207 18:59:03.446684   138 node.cpp:943] node default_group:172.18.0.2:8107:8108 starts to do snapshot
I20250207 18:59:03.447271   296 raft_server.cpp:554] on_snapshot_save
I20250207 18:59:03.447347   296 batched_indexer.cpp:571] Serialized 0 in-flight requests for snapshot.
I20250207 18:59:03.494668   296 raft_server.cpp:480] save_snapshot called
I20250207 18:59:03.507514   296 snapshot.cpp:642] Deleting /data/state/snapshot/snapshot_00000000000001100170
I20250207 18:59:03.507591   296 snapshot.cpp:648] Renaming /data/state/snapshot/temp to /data/state/snapshot/snapshot_00000000000001100170
I20250207 18:59:03.507639   296 snapshot.cpp:519] Deleting /data/state/snapshot/snapshot_00000000000001100168
I20250207 18:59:03.517138   296 snapshot_executor.cpp:234] node default_group:172.18.0.2:8107:8108 snapshot_save_done, last_included_index=1100170 last_included_term=18
I20250207 18:59:03.530437   294 log.cpp:1150] log save_meta /data/state/log/log_meta first_log_index: 1100169 time: 12879
I20250207 18:59:03.599927   303 raft_server.cpp:522] Copying system snapshot to external snapshot directory at /backups
E20250207 18:59:03.600128   303 <http://file_util_posix.cc:324]|file_util_posix.cc:324]> CopyDirectory() couldn't create directory: /backups/state errno = 2
E20250207 18:59:03.600276   303 <http://file_util_posix.cc:324]|file_util_posix.cc:324]> CopyDirectory() couldn't create directory: /backups/state errno = 2
E20250207 18:59:03.600476   296 raft_server.cpp:1179] On demand snapshot failed, error:
E20250207 18:59:03.600589   296 raft_server.cpp:1183] Copy failed.
I20250207 18:59:03.605010   303 raft_server.cpp:933] Dummy write to <http://172.18.0.2:8108/health>, status = 200, response = {"ok":true}
I20250207 18:59:03.605065   303 raft_server.cpp:547] save_snapshot done
I20250207 18:59:05.621717   262 raft_server.cpp:706] Term: 18, pending_queue: 0, last_index: 1100171, committed: 1100171, known_applied: 1100171, applying: 0, pending_writes: 0, queued_writes: 0, local_sequence: 5634244
I20250207 18:59:05.622058   290 raft_server.h:60] Peer refresh succeeded!
1