-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 use Local Storage for backup #1288
Comments
You would need to mount a folder, e.g.: version: "3"
services:
db:
image: postgres:11-alpine
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
POSTGRES_USER: wikijs
logging:
driver: "none"
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
wiki:
image: requarks/wiki:2
depends_on:
- db
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: wikijs
DB_PASS: wikijsrocks
DB_NAME: wiki
restart: unless-stopped
ports:
- "80:3000"
volumes:
- /host/backup/path:/backups
volumes:
db-data: Then specify |
Hello, i tried that and save it in the compose file. the folder on host and container is created. i specified the path in wikijs but nothing is happen if i click on create backup. both folder are empty. |
I ran into the same problem. This
did the trick for me. |
That still doesn't work for me.The backups folder defined in docker-compose.yml is created as root. |
@Schnuecks Assign the user node to the Docker group and that should fix your issue. |
@ssimontis How? I have no node user on the host who could i assigne for docker group |
@Schnuecks I'll get you an answer tonight, one of my goals for this evening is to dig into the Dockerfiles |
The problem is that the backup folder is created with root ownership on the container and therefore the node user does not have write permissions on this folder. To fix this the folder ownership in the container must be changed to node:node. We could change the Dockerfile to have a default backup folder with the correct permissions in the container. What do you think? Temporary you can connect on the container (docker exec) and change the ownership to node:node of your backup folder. |
I think that sounds like a winner to me...in my opinion the more directories we can pry away from root ownership related to our applications, the better |
Sounds good. A default backup location with correct permission seems the way to go. |
|
Hello,
how could i use the local storage for backup?
i ran the docker-compose.yml from docs.
how do i need to modify the docker-compose.yml to set a volume or path so wikijs could backup in it and copy to the host.
OS: CentOS 7, docker-compose
Wiki.js version: 2.0.12
Database engine: postgres 9
The text was updated successfully, but these errors were encountered: