Skip to content

[Question] Any examples to restore from thinBackup zipped file into Jenkins in GKE? #20

Description

@scheung38

https://github.com/helm/charts/tree/master/stable/jenkins

Restore from backup
To restore a backup, you can use the kube-tasks underlying tool called skbn, which copies files from cloud storage to Kubernetes. The best way to do it would be using a Job to copy files from the desired backup tag to the Jenkins pod. See the skbn in-cluster example for more details.


I have uploaded into Google Storage:

gsutil cp ~/Desktop/jenkins-full.tgz gs://migrate_sample

so the:

Authenticated URL: https://storage.cloud.google.com/migrate_sample/jenkins-full.tgz?authuser=1
gsutil URI: gs://migrate_sample.tgz

How to use the following jobs.yaml? I see it is not configured for GCP but AWS?

apiVersion: batch/v1
kind: Job1
metadata:
  labels:
    app: skbn
  name: skbn
spec:
  template:
    metadata:
      labels:
        app: skbn
      annotations:
        iam.amazonaws.com/role: skbn # We are using kube2iam <- Swap skbn -> kube2iam and create ServiceAccount? https://github.com/jtblin/kube2iam/blob/master/examples/eks-example.yml
    spec:
      restartPolicy: OnFailure
      serviceAccountName: skbn
      containers:
      - name: skbn
        image: maorfr/skbn
        command: ["skbn"]
        args:
        - cp
        - --src
        - k8s://namespace/pod/container/path/to/copy/from
        - --dst
        - s3://bucket/path/to/copy/to
        imagePullPolicy: IfNotPresent
        env:
        - name: AWS_REGION
          value: eu-central-1

Also in this case I would need to swap src and dst from example to:

    - --src
    - gs://migrate_sample/jenkins-full.tgz
    - --dst
    - k8s://namespace/pod/container/path/to/copy/to

How do we get k8s://namespace/pod/container/path/to/copy/to

Assuming namespace is jenkins, would it be

k8s://jenkins/my-jenkins-0/var/backups

Activity

  1. changed the title [-][Question] How to restore from thinBackup zipped file into Jenkins in GKE?[/-] [+][Question] Any example to restore from thinBackup zipped file into Jenkins in GKE?[/+] on Dec 15, 2021
  2. changed the title [-][Question] Any example to restore from thinBackup zipped file into Jenkins in GKE?[/-] [+][Question] Any examples to restore from thinBackup zipped file into Jenkins in GKE?[/+] on Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions