Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libre.sh
kubernetes
common
Commits
aa1e51a4
Commit
aa1e51a4
authored
3 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
Adds dump/restore to hedgedoc
parent
668df504
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hedgedoc/other-manifests/dump-standard.yml
+43
-0
43 additions, 0 deletions
hedgedoc/other-manifests/dump-standard.yml
hedgedoc/other-manifests/restore.yml
+42
-0
42 additions, 0 deletions
hedgedoc/other-manifests/restore.yml
with
85 additions
and
0 deletions
hedgedoc/other-manifests/dump-standard.yml
0 → 100644
+
43
−
0
View file @
aa1e51a4
apiVersion
:
batch/v1
kind
:
Job
metadata
:
labels
:
application
:
spilo-logical-backup
job-name
:
dump
name
:
dump
spec
:
backoffLimit
:
6
completions
:
1
parallelism
:
1
selector
:
matchLabels
:
job-name
:
dump
template
:
metadata
:
creationTimestamp
:
null
labels
:
application
:
spilo-logical-backup
job-name
:
dump
spec
:
containers
:
-
command
:
-
/bin/sh
-
-c
args
:
-
psql -h ${FQDN}-postgresql -p 5432 -U codimd -c "\l";
-
pg_dump -h ${FQDN}-postgresql -p 5432 -U codimd -Fc codimd | pigz | aws s3 cp - s3://${NS}-dumps/migrations/$(date +%m-%d-%Y).sql.gz --endpoint-url=https://minio.k7.indie.host --region=default
env
:
-
name
:
PGPASSWORD
valueFrom
:
secretKeyRef
:
key
:
postgresql-password
name
:
${FQDN}
-
name
:
AWS_S3_FORCE_PATH_STYLE
value
:
"
true"
envFrom
:
-
secretRef
:
name
:
${NS}-dumps
image
:
registry.opensource.zalan.do/acid/logical-backup:v1.6.2
imagePullPolicy
:
IfNotPresent
name
:
logical-backup
restartPolicy
:
Never
\ No newline at end of file
This diff is collapsed.
Click to expand it.
hedgedoc/other-manifests/restore.yml
0 → 100644
+
42
−
0
View file @
aa1e51a4
apiVersion
:
batch/v1
kind
:
Job
metadata
:
labels
:
application
:
spilo-logical-backup
job-name
:
restore
name
:
restore
spec
:
backoffLimit
:
6
completions
:
1
parallelism
:
1
selector
:
matchLabels
:
job-name
:
restore
template
:
metadata
:
creationTimestamp
:
null
labels
:
application
:
spilo-logical-backup
job-name
:
restore
spec
:
containers
:
-
command
:
-
/bin/sh
-
-c
args
:
-
aws s3 cp s3://${NS}-dumps/migrations/$(date +%m-%d-%Y).sql.gz - --endpoint-url=https://minio.k7.indie.host --region=default | unpigz | pg_restore -d hedgedoc -h pg-${NS} -p 5432 -U hedgedoc
env
:
-
name
:
PGPASSWORD
valueFrom
:
secretKeyRef
:
key
:
password
name
:
hedgedoc.pg-${NS}.credentials
-
name
:
AWS_S3_FORCE_PATH_STYLE
value
:
"
true"
envFrom
:
-
secretRef
:
name
:
${NS}-dumps
image
:
registry.opensource.zalan.do/acid/logical-backup:v1.6.2
imagePullPolicy
:
IfNotPresent
name
:
logical-backup
restartPolicy
:
Never
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment