Skip to content
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

Initialization completely clears /var/www/html directory #1050

Closed
bllngr opened this issue Mar 29, 2020 · 2 comments
Closed

Initialization completely clears /var/www/html directory #1050

bllngr opened this issue Mar 29, 2020 · 2 comments
Labels

Comments

@bllngr
Copy link

bllngr commented Mar 29, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create some test files and folders in a (otherwise empty) directory
  2. Setup Nextcloud using the 17.0.5-apache Docker image, mounting the mentioned directory as /var/www/html/
  3. Start the docker image

Expected behaviour

Existing files that don't belong to a Nextcloud installation are left intact.

Actual behaviour

The directory is cleared completely, including all files and directories within.

This is fatal when you accidentally mount a wrong path as /var/www/html/. In my case, I accidentally mounted /docker instead of /docker/nextcloud, and thus lost all my docker container data.

Server configuration

17.0.5-apache docker image from Docker Hub.

Logs

22:13:47 Initializing nextcloud 17.0.5.0 ...
22:15:03 Initializing finished
22:15:03 New nextcloud instance
@kesselb kesselb transferred this issue from nextcloud/server Mar 29, 2020
@kesselb kesselb added the bug label Mar 29, 2020
@bllngr bllngr changed the title [Docker] Initialization complete clears /var/www/html directory Initialization completely clears /var/www/html directory Apr 2, 2020
@orangutanga
Copy link

Culprit is in entrypoint.sh:

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/

the --delete option.

Also causes issues when modifying the /var/www/html/ directory in a Dockerfile. Results are lost.

@joshtrichards
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants