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

Enable MariaDB binary log #1881

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Enable MariaDB binary log #1881

merged 2 commits into from
Feb 17, 2023

Conversation

meonkeys
Copy link
Contributor

@meonkeys meonkeys commented Dec 9, 2022

This resolves a warning in the database server log:

[Warning] You need to use --log-bin to make --binlog-format work.

Pros:

  • support for point-in-time recovery
  • necessary for replication

Cons:

  • slows down database operations ("slightly", per the manual)
  • takes up disk space (mitigated by --expire-logs-days=2)

See also:

Alternatives:

  1. Do not add --log-bin. Remove --binlog-format instead. This causes the least amount of change for existing installations.

Signed-off-by: Adam Monsen [email protected]

This resolves a warning in the database server log:

    [Warning] You need to use --log-bin to make --binlog-format work.

Pros:

* support for point-in-time recovery
* necessary for replication

Cons:

* slows down database operations ("slightly", per the manual)
* takes up disk space (mitigated by `--expire-logs-days=2`)

See also:

* <https://mariadb.com/kb/en/binary-log/>
* <https://mariadb.com/kb/en/full-list-of-mariadb-options-system-and-status-variables/>

Alternatives:

1. Do not add `--log-bin`. Remove `--binlog-format` instead. This causes the least amount of change for existing installations.

Signed-off-by: Adam Monsen <[email protected]>
@meonkeys
Copy link
Contributor Author

meonkeys commented Feb 8, 2023

Thank you, I reviewed those sections of documentation. The first one recommends either using a row-level binary log or disabling the binary log. The second one (with the example my.cnf) indicates use of a row-level binary log.

My patch is mostly coherent with the documentation, and it fixes the MariaDB warning. I anticipate the impact of the change will be minimal and positive.

To better align with recommendations in the Nextcloud documentation, I'll remove --expire-logs-days=2. This isn't necessary. The MySQL and MariaDB documentation both state that binary logs will be purged on startup and flush/rotation anyway.

This better aligns with recommendations in the Nextcloud documentation.

Also: the flag isn't necessary. There are already set times for cleanup: The MySQL and MariaDB documentation both state that binary logs will be purged on startup and flush/rotation.

Signed-off-by: Adam Monsen <[email protected]>
@J0WI J0WI merged commit d1d0d89 into nextcloud:master Feb 17, 2023
@meonkeys meonkeys deleted the enable-binary-log branch February 17, 2023 15:20
ananace pushed a commit to ananace/docker-nextcloud that referenced this pull request May 10, 2024
* Enable MariaDB binary log

This resolves a warning in the database server log:

    [Warning] You need to use --log-bin to make --binlog-format work.

Pros:

* support for point-in-time recovery
* necessary for replication

Cons:

* slows down database operations ("slightly", per the manual)
* takes up disk space (mitigated by `--expire-logs-days=2`)

See also:

* <https://mariadb.com/kb/en/binary-log/>
* <https://mariadb.com/kb/en/full-list-of-mariadb-options-system-and-status-variables/>

Alternatives:

1. Do not add `--log-bin`. Remove `--binlog-format` instead. This causes the least amount of change for existing installations.

Signed-off-by: Adam Monsen <[email protected]>

* remove --expire-logs-days=2 mariadb flag

This better aligns with recommendations in the Nextcloud documentation.

Also: the flag isn't necessary. There are already set times for cleanup: The MySQL and MariaDB documentation both state that binary logs will be purged on startup and flush/rotation.

Signed-off-by: Adam Monsen <[email protected]>

---------

Signed-off-by: Adam Monsen <[email protected]>
@joshtrichards joshtrichards mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants