Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to read files from store inside docker volume #3481

Closed
DrSamjames opened this issue Dec 11, 2023 · 2 comments
Closed

How to read files from store inside docker volume #3481

DrSamjames opened this issue Dec 11, 2023 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@DrSamjames
Copy link

Hi

After a power cut my SD card that I was using to run ZWave JS on a Pi is no longer bootable. but I can still read the files off it. I've installed ZWave JS on a fresh card and my zwave controller still sees all my zwave devices but I've lost all the name and scene.

Is there a simple way to copy the store from my old SD card into my new installation?

I’m using docker compose, this is my config at the moment which is basicly the same as the old one:

version: "3.7"
services:
  zwave-js-ui:
    container_name: zwave-js-ui
    image: zwavejs/zwave-js-ui:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
      #- SESSION_SECRET=mysupersecretkey
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
      # Uncomment if you want log times and dates to match your timezone instead of UTC
      # Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      - TZ=Europe/London
    networks:
      - zwave
    devices:
      # Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
      # Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
      - '/dev/ttyAMA0:/dev/ttyAMA0'
    volumes:
      - zwave-config:/usr/src/app/store
   # Or by using local folder
   # - ./store:/usr/src/app/store
    ports:
      - "8091:8091" # port for web interface
      - "3000:3000" # port for Z-Wave JS websocket server
networks:
  zwave:
volumes:
  zwave-config:
    name: zwave-config

@DrSamjames DrSamjames added the question Further information is requested label Dec 11, 2023
@kpine
Copy link
Contributor

kpine commented Dec 11, 2023

Docker volumes are usually located under /var/lib/docker/volumes. You may find the store files in there.

@robertsLando
Copy link
Member

robertsLando commented Dec 12, 2023

In order to read files from the volume, start the docker file and run:

docker-compose up -d
mkdir -p store
docker cp $(docker ps -qf "name=zwave-js-ui"):/usr/src/app/store/. ./store

This will copy volumes files inside the folder from where you are running the command

@robertsLando robertsLando changed the title Restore from unbootable SD card How to read files from store inside docker volume Dec 12, 2023
@zwave-js zwave-js locked and limited conversation to collaborators Dec 12, 2023
@robertsLando robertsLando converted this issue into discussion #3482 Dec 12, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants