Skip to content
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

Set a restic tag in a BackupConfiguration #1346

Closed
zonca opened this issue May 20, 2021 · 1 comment · Fixed by stashed/apimachinery#121
Closed

Set a restic tag in a BackupConfiguration #1346

zonca opened this issue May 20, 2021 · 1 comment · Fixed by stashed/apimachinery#121

Comments

@zonca
Copy link

zonca commented May 20, 2021

I deployed stash to backup persistent volumes with restic, is there a way to set a restic tag for each backupconfiguration?

Now if I access my backups via restic command line tool, I see:

ID        Time                 Host        Tags        Paths
------------------------------------------------------------------
17b32c09  2021-05-16 01:40:15  host-0                  /stash-data
f1c25a84  2021-05-19 01:30:20  host-0                  /stash-data
af54e5da  2021-05-19 01:40:16  host-0                  /stash-data
5954b64c  2021-05-20 01:10:31  host-0                  /stash-data
08f01220  2021-05-20 01:20:20  host-0                  /stash-data
c15f4f0c  2021-05-20 01:30:25  host-0                  /stash-data
23cb311a  2021-05-20 01:40:09  host-0                  /stash-data
------------------------------------------------------------------

It would be nice if I can specify a tag so I know which user owns which volume even outside of stash.

In case it is useful, my backupconfiguration:

apiVersion: stash.appscode.com/v1beta1
kind: BackupConfiguration
metadata:
  name: test-backup
  namespace: jhub
spec:
  driver: Restic
  repository:
    name: osn-repo
  task:
    name: pvc-backup
  schedule: "* * * * *"
  paused: false
  backupHistoryLimit: 3
  runtimeSettings:
    container:
      securityContext:
        runAsUser: 1000
  target:
    exclude:
    - /stash-data/lost+found
    ref:
      apiVersion: v1
      kind: PersistentVolumeClaim
      name: claim-zonca
  retentionPolicy:
    name: 'keep-last-5-zonca'
    keepLast: 5
    prune: true
@zonca zonca changed the title Set a restic tag in a backupconfiguration Set a restic tag in a BackupConfiguration May 20, 2021
@hossainemruz
Copy link
Contributor

@zonca We have decided to introduce a generic option to pass user arguments to the restic backup/restore command. Check this PR: stashed/apimachinery#121

Now, you can pass any flags (including --tag) to the restic backup/restore command. Please see the example here: #1384

tamalsaha pushed a commit to stashed/apimachinery that referenced this issue Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants