drupalwxt / helm-drupal

Helm Chart for deploying an enterprise-grade Drupal environment.
https://drupalwxt.github.io/helm-drupal/index.yaml
MIT License
31 stars 22 forks source link

Backup script will capture the DB cache and will create huge backup files as a result #80

Closed bernardmaltais closed 3 years ago

bernardmaltais commented 3 years ago

Hello guys,

I am looking at a way to feed an ignore tables list to the backup job to prevent exporting useless tables like cache. At the moment I don't see a way to do this in the chart short of not enabling backup and creating my own cronjob outside the helm chart... but we are using the chart because everything needed is available in there... so it would defeat the purpose.

Is this something you had on the roadmap? How do you handle not backing caches in the DB for your own deployment?

I might propose an idea. How about adding an optional value to the backup section where we could capture extra drush -y sql-dump options? That way we could specify which tables to ignore with:

# Add option extra options to the drush -y sql-dump command
extra_options: --skip-tables-list=cache,cache_*

If you are interested I could submit a PR with the proposed changes to support the feature?

Bernard

sylus commented 3 years ago

Looks like we only added this in D7 so should add it to D9 as well :D

https://github.com/drupalwxt/helm-drupal/commit/4f3ac6e0f553dddc8cc44571a3554d3301949478

bernardmaltais commented 3 years ago

I see it in D7, you are right ;-) OK, no need for my PR then. I will let you add this simple fix ;-) Once it is added I will start using that instead of the ugly kubectl patch I had to implement ;-)

sylus commented 3 years ago

This should do it thanks so much :D

https://github.com/drupalwxt/helm-drupal/commit/259ea8ac3be7c057f849917d1f671e3f9fd49edc