Skip to content

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

Description

@bllngr

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

Activity

  1. transferred this issue fromnextcloud/serveron Mar 29, 2020
  2. changed the title [-][Docker] Initialization complete clears /var/www/html directory[/-] [+]Initialization completely clears /var/www/html directory[/+] on Apr 2, 2020
  3. orangutanga commented on Mar 25, 2022

    @orangutanga

    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.

  4. joshtrichards commented on Oct 21, 2023

    @joshtrichards
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions