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

Restore velero backup into different DigitalOcean account #5

Open
tvedtorama opened this issue Sep 19, 2020 · 1 comment
Open

Restore velero backup into different DigitalOcean account #5

tvedtorama opened this issue Sep 19, 2020 · 1 comment

Comments

@tvedtorama
Copy link

tvedtorama commented Sep 19, 2020

I am trying to restore a k8s cluster from one DO account into another. At the first attempt it went "fine", except I had put the source DO Token in the velero config. Hence the volumes was restored into the old account, everything else in the target account. Not satisfied with this failure I updated the token and tried again. This time the velero restore just did not complete. After trying again, possibly inducing some duplication errors, i saw some errors on the velero pod itself, indication that it could not read the snapshot:

Storage.GetSnapshot returned error: GET https://api.digitalocean.com/v2/snapshots/654fe732-f99f-11ea-bc4a-0a58ac14807e: 404 

This makes sense, given that snapshots are used for the backup - the target site token would not be able to read them. How can I then backup/restore between accounts?

The second run actually ended, and among some certificate errors, I saw this:

error executing PVAction for persistentvolumes/pvc-0b3f9d26-9fcf-4b0f-940a-e925fb3163a4: rpc error: code = Aborted desc = plugin panicked: runtime error: invalid memory address or nil pointer dereference 

BTW: From my testing, velero on DO seems to suit our needs. Restores across accounts is just for testing, not a requirement. Is this assumption correct, or does DO recommend a better, or more professional, tool?

@aramperes
Copy link

When restoring, the DO token is used for two things:

  • retrieving the volume snapshot
  • creating a new volume from the snapshot

DigitalOcean doesn't have a way to create a volume from a snapshot in another account. In fact, volume snapshots are completely useless apart from re-creating volumes in the same account. You can't even download them for example (these features have been requested since 2018).

Personally I'm trying to move an entire cluster from one account to another. It doesn't seem like using Velero is feasible since you can't transfer the volumes automatically from one account to the other. So, I'll be doing this:

  1. create snapshots for each volume
  2. create new volumes for each snapshot
  3. attach the duplicated volumes to a droplet
  4. scp/sftp/rsync the files from the droplet
  5. delete the droplet, the volumes, and the snapshots
  6. create the new cluster in the new account
  7. re-install all my helm charts
  8. scp/sftp/rsync into the new, empty PersistentVolumeClaims with the data downloaded in step 4
  9. finally deleting the old cluster

All that because I can't separate billing between two clusters without moving one to another account...

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

No branches or pull requests

2 participants