1
Answer

facing an issue for docker volume where

Hello I am facing an issue for docker volume where I am using frappe-app using docker-compose. I have downloaded and installed hrms on both frontend and backend containers. I want a backup of this volume so that i can attach it.

docker volume ls
local     pwd_db-data
local     pwd_logs
local     pwd_redis-queue-data
local     pwd_sites
local     student-api_postgres_data

I created a tar file by using

docker run --rm \
  -v pwd_sites:/source \
  -v $(pwd):/backup \
  busybox \
  sh -c "ls -la /source && tar czvf /backup/sites_backup.tar.gz -C /source ."

stopped and removed containers restored the volume and extracted the backup by using

docker volume create pwd_sites 
docker run --rm \
  -v pwd_sites:/target \
  -v $(pwd):/backup \
  busybox \
  tar xzvf /backup/sites_backup.tar.gz -C /target

modified my pwd.yaml (docker compose manifest)

version: "3"
services:
  backend:
    image: frappe/erpnext:v15.61.0
    volumes:
      - pwd_sites:/home/frappe/frappe-bench/sites
  # ... (other services)
volumes:
  pwd_sites:
    external: true

I came up with an error which is

docker compose -p pwd up -d
WARN[0000] The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ERPNEXT_VERSION" variable is not set. Defaulting to a blank string

Answers (1)