Skip to content

Use bind mounts in sample config#2035

Merged
casperklein merged 7 commits intomasterfrom
casperklein-patch-1
Jun 16, 2021
Merged

Use bind mounts in sample config#2035
casperklein merged 7 commits intomasterfrom
casperklein-patch-1

Conversation

@casperklein
Copy link
Copy Markdown
Member

@casperklein casperklein commented Jun 14, 2021

Description

If we switch to bind mounts in the sample config, that will simplify backup/restore of DMS.

See also: #1906

This would also make the not 100% correct working script at https://docker-mailserver.github.io/docker-mailserver/edge/faq/#what-about-backups obsolete.

Backup/restore would then just be simple host commands cp / mv..

What do you think?

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@casperklein casperklein requested a review from a team June 14, 2021 17:48
@casperklein casperklein self-assigned this Jun 14, 2021
@casperklein casperklein added area/documentation kind/improvement Improve an existing feature, configuration file or the documentation labels Jun 14, 2021
@georglauterbach
Copy link
Copy Markdown
Member

Actually a good idea. But this requires a documentation update.

@casperklein
Copy link
Copy Markdown
Member Author

For sure. But before wasting time, I wanted to know beforehand what your opinions are 😎

@wernerfred
Copy link
Copy Markdown
Member

I prefer bind mounts over volumes (personal opinion) so you have my vote

Copy link
Copy Markdown
Member

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding to the FAQ how to restore?

I also wanted to be a bit more explicit about the option for compressing to gzip. I'd suggest --zstd with tar.zst but not sure how wide the support for that is.

Comment thread docs/content/faq.md
@polarathene
Copy link
Copy Markdown
Member

Backup/restore would then just be simple host commands cp / mv..

Doesn't that mess with permissions / ownership metadata on files?

I prefer bind mounts myself, but a common issue I can run into with containers is the container writes the files with different uid/gid (mostly only an annoyance if you're non-root), or you configure some files from the host side and if the container lacks permission to read/write the file it gets upset.

Regarding the referenced issue, kinda seems odd to backup clamav bloat, depending on the age of the backup when it's restored, I'm not sure how worthwhile that would be to retain? This is still a nice improvement anyway :)

@georglauterbach
Copy link
Copy Markdown
Member

Might be worth adding to the FAQ how to restore?

I also wanted to be a bit more explicit about the option for compressing to gzip. I'd suggest --zstd with tar.zst but not sure how wide the support for that is.

I think creating a .tar.gz is the most widely compatible archive for Linux and we should use that:)

@polarathene
Copy link
Copy Markdown
Member

I think creating a .tar.gz is the most widely compatible archive for Linux and we should use that :)

Yeah, that's why I was reluctant with my preference to use zstd (which is definitely better when available).

I'd still prefer the more explicit option of --gzip however, since this is a FAQ item and the user is probably going to copy/paste anyway.

@wernerfred
Copy link
Copy Markdown
Member

I'd still prefer the more explicit option of --gzip however

I prefer verbosity, too. Always hard for future contributions to look up / follow along if a bunch of short options is thrown together using a tool a contributor might not know. As most will copy/paste it anyways it should not be a big deal

@georglauterbach
Copy link
Copy Markdown
Member

Yes. We will use the long option --gzip :)

@casperklein
Copy link
Copy Markdown
Member Author

casperklein commented Jun 15, 2021

@docker-mailserver/maintainers feel free to edit/add docu yourself to this PR 👍

This was just a first attempt. I was too tired to continue yesterday.

wernerfred and others added 4 commits June 15, 2021 13:16
@github-actions
Copy link
Copy Markdown
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: a2d3dea

@casperklein casperklein marked this pull request as ready for review June 15, 2021 21:26
@casperklein casperklein requested a review from a team June 15, 2021 21:26
Comment thread docs/content/faq.md
@casperklein casperklein merged commit b6b0948 into master Jun 16, 2021
@casperklein casperklein deleted the casperklein-patch-1 branch June 16, 2021 11:24
@NorseGaud
Copy link
Copy Markdown
Member

NorseGaud commented Jun 16, 2021

❤️

@casperklein casperklein mentioned this pull request Jun 21, 2021
11 tasks
casperklein added a commit that referenced this pull request Jun 21, 2021
* remove volumes section

* bind mounts + localtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation kind/improvement Improve an existing feature, configuration file or the documentation priority/low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants