-
Notifications
You must be signed in to change notification settings - Fork 10
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
Backup Database and put in s3 #2109
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Terraform plan for meta Plan: 2 to add, 0 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# null_resource.share-backup-to-spaces will be created
+ resource "null_resource" "share-backup-to-spaces" {
+ id = (known after apply)
}
# module.s3-backups.cloudfoundry_service_instance.bucket will be created
+ resource "cloudfoundry_service_instance" "bucket" {
+ id = (known after apply)
+ name = "backups"
+ replace_on_params_change = false
+ replace_on_service_plan_change = false
+ service_plan = "021bb2a3-7e11-4fc2-b06b-d9f5938cd806"
+ space = "5593dba8-7023-49a5-bdbe-e809fe23edf9"
}
Plan: 2 to add, 0 to change, 0 to destroy.
Warning: Argument is deprecated
with module.s3-backups.cloudfoundry_service_instance.bucket,
on /tmp/terraform-data-dir/modules/s3-backups/s3/main.tf line 14, in resource "cloudfoundry_service_instance" "bucket":
14: recursive_delete = var.recursive_delete
Since CF API v3, recursive delete is always done on the cloudcontroller side.
This will be removed in future releases ❌ Error applying plan in Deploy to Development and Management Environment #210 |
Terraform plan for dev No changes. Your infrastructure matches the configuration.
✅ Plan applied in Deploy to Development and Management Environment #210 |
pg_dump
30 tasks
Minimum allowed coverage is Generated by 🐒 cobertura-action against 72ac199 |
c820141
to
98ab4d9
Compare
mogul
reviewed
Sep 14, 2023
In order to run python manage.py dbrestore, 512M wasn't enough to actually do the restore.
NOTE: NOT YET FUNCTIONAL! This is a sketch until the TODOs are addressed
This makes it so that we do not need to modify the manifest, and only expose the backup bucket while we are actually using it, i.e when we want to do a backup.
Based on the values in config.tf
This appears to be redundant. Removing this does not change the requirements.txt file
4378210
to
c453da1
Compare
timoballard
approved these changes
Sep 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Deployment Note:
A tag is created ->
deploy-production.yml
is run with theon:
function, looking for a tagv1.*
->inside
deploy-application.yml
which is called fromdeploy-production.yml
the stage to backup the database runs only on a tag matchingv1.
. It is not wildcarded, hence thestartsWith(github.ref, 'refs/tags/v1.')
. I tested this, in a different way by doing the following:A workflow that is run on tag
v1.*
if: startsWith(github.ref, 'refs/tags/v2.')
and the job was skippedif: startsWith(github.ref, 'refs/tags/v1.')
and the step was runList any special steps reviewers have to follow to test the PR. For example, adding a local environment variable, creating a local test file, etc.
That will net the following result:
Full output, of backup and restore:
main
into your branch shortly before creating the PR. (You should also be mergingmain
into your branch regularly during development.)PR checklist: reviewers
fac-private-s3
inprod
Because this modifies settings.py, adding Tadhg and Tim as reviewers.
What this PR does:
-i
issue with load data. While we set the psql alias in.profile
, the task runner needs have it set as $PATH in order to run. Since we have to do this forload_data.sh
we may as well keep it standard forbackup_database.sh
postgresql-client
from apt.yml, our0
buildpack, and replaces it withpostgresql-client-15
settings.py
to accept django-dbbackup, and point it to the private s3django-storages[boto3]
on top ofdjango-dbbackup