StatCan / aaw

Documentation for the Advanced Analytics Workspace Platform
https://statcan.github.io/aaw/
Other
69 stars 12 forks source link

Investigate how to leverage Velero for Dev #1756

Closed Jose-Matsuda closed 1 year ago

Jose-Matsuda commented 1 year ago

Hard initial deadline of end of day Tuesday July 4th https://cloudnative.pages.cloud.statcan.ca/en/documentation/best-practices-meilleures-pratiques/how-to-guide/velero.namespace.restore/

Will close this after discussing results at tech elab.

Jose-Matsuda commented 1 year ago

Jose notes We'd probably want a on-demand backup that backs up the entire cluster state

Questions to answer:

1) Where do backups get saved? Where did CNS setup Velero to send backups to?

Things to try in dev

1) Create a backup of a single namespace with resources in it in dev. 2) Delete that namespace and all resources kubectl delete all --all -n jose-test-delete 3) Attempt to restore it. velero restore create restore-name --from {name}

Other Info

There are restore hooks but I don't think we need these as I dont believe there's anything special. Let's also not mess with any backup storage locations

Jose-Matsuda commented 1 year ago

Technical Elaboration Questions and Notes (WIP)

This is meant to be a more consumable version of my above comment, where I ramble and care less about quality.

Talking points / Questions / What would we the general development team want to know?

  1. What are we currently backing up?

    • Given the spec of one of the backup resources we can determine that we backup resources under all namespaces that are not volumes.
  2. How often are we backing up?

    • Hourly
  3. Where is it stored?

  4. How can we restore something?

    • velero restore create restore-name --from-backup {name} where restore-name is the name of what you want the restore to be called and {name} is the name of the backup you are referring to (like velero-hourly-resources-20230630120028)
  5. How do we manually create a backup?

Example Run through

Using official docs. Also do not forget the --namespace velero-system flag when running any velero commands Do note that CNS has their own documentation on restoring using velero.

Jose-Matsuda commented 1 year ago

Find out if you can restore just a specific resource. The backup resource will generally have multiple resources (secrets, configmaps etc) but can we restore just secrets?

Note that by default velero won't overwrite

Just use resource filtering