Skip to content

Possebility of corrupted mysqldump when using docker #4682

@TheOneRing

Description

@TheOneRing

WHAT Needs to be Documented?

When following the instructions to create a mysqldump with docker

docker-compose exec mariadb \
     /usr/bin/mysqldump -u root --password=owncloud \
     owncloud > owncloud_$(date +%Y%m%d).sql

The process appears to be stuck and when it eventually finishes the dump is corrupted,
namely only the table definitions made it to the dump, not the data.

Adding -T to the exec however solves that issue

docker-compose exec -T mariadb \
     /usr/bin/mysqldump -u root --password=owncloud \
     owncloud > owncloud_$(date +%Y%m%d).sql

https://docs.docker.com/compose/reference/exec/

Dumping in a non interactive shell works without a problem.

WHERE Does This Need To Be Documented (Link)?

https://doc.owncloud.com/server/next/admin_manual/installation/docker/

WHY Should This Change Be Made?

Working backups are kind of important

(Optional) What Type Of Content Change Is This?

  • New Content Addition
  • Old Content Deprecation
  • Existing Content Simplification
  • Bug Fix to Existing Content

(Optional) Which Manual Does This Relate To?

  • Admin Manual
  • Developer Manual
  • User Manual
  • Android
  • iOS
  • Branded Clients
  • Desktop Client
  • Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions