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

PVC migration from aws eks gp2 to k3s local-path #8629

Open
robin-coac opened this issue Jan 20, 2025 · 1 comment
Open

PVC migration from aws eks gp2 to k3s local-path #8629

robin-coac opened this issue Jan 20, 2025 · 1 comment
Labels
area/migration The issues when user uses velero to handle migration across clusters. Needs info Waiting for information

Comments

@robin-coac
Copy link

What steps did you take and what happened:
I want to migrate postgres and elasticsearch from AWS EKS (using gp2 storage class) to baremetal k3s ( with local-path storage class).

## Velero setup in Source Machine | Where kubectl pointed to EKS 
helm install velero vmware-tanzu/velero \
--namespace velero \
--create-namespace \
--set-file credentials.secretContents.cloud=/tmp/credentials-velero \
--set configuration.backupStorageLocation[0].name=default \
--set configuration.backupStorageLocation[0].provider=aws \
--set configuration.backupStorageLocation[0].bucket=test-bucket \
--set configuration.backupStorageLocation[0].prefix=velero_test_jan_14 \
--set configuration.backupStorageLocation[0].config.region=eu-central-1 \
--set configuration.volumeSnapshotLocation[0].name=default \
--set configuration.volumeSnapshotLocation[0].provider=aws \
--set configuration.volumeSnapshotLocation[0].config.region=eu-central-1 \
--set initContainers[0].name=velero-plugin-for-aws \
--set initContainers[0].image=velero/velero-plugin-for-aws:v1.10.0 \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=plugins \
--set deployNodeAgent=true

velero backup create backup-jan20 --default-volumes-to-fs-backup --include-namespaces test-ns
# velero installation in k3s Cluster machine
helm install velero vmware-tanzu/velero \
--namespace velero \
--create-namespace \
--set-file credentials.secretContents.cloud=/tmp/credentials-velero \
--set configuration.backupStorageLocation[0].name=default \
--set configuration.backupStorageLocation[0].provider=aws \
--set configuration.backupStorageLocation[0].bucket=test-bucket \
--set configuration.backupStorageLocation[0].prefix=velero_test_jan_14 \
--set configuration.backupStorageLocation[0].config.region=eu-central-1 \
## These aws init container is required to sync to same bucket in other machine.
--set initContainers[0].name=velero-plugin-for-aws \
--set initContainers[0].image=velero/velero-plugin-for-aws:v1.10.0 \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set initContainers[0].volumeMounts[0].name=plugins \
--set deployNodeAgent=true \
--set configuration.volumeSnapshotLocation=[]

## Create Configmap for storage-class mappings

apiVersion: v1
data:
  gp2: local-path
kind: ConfigMap
metadata:
  labels:
    velero.io/change-storage-class: RestoreItemAction
    velero.io/plugin-config: ""
  name: change-storage-class-config
  namespace: velero

velero restore create restore-jan20 \
  --from-backup backup-jan20 \
  --exclude-resources orders.acme.cert-manager.io,certificaterequests.cert-manager.io,certificates.cert-manager.io

What did you expect to happen:
As expected, all items are correctly migrated except the persistent volumes.
I find old data is not there in my new db.

@Lyndon-Li
Copy link
Contributor

For DB backup/migration, data mover backup method is recommended, because fs-backup is not consistent.
So you can try with data mover backup once more, if you still have the problem, just update this issue with Velero log bundle.

@Lyndon-Li Lyndon-Li added Needs info Waiting for information area/migration The issues when user uses velero to handle migration across clusters. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/migration The issues when user uses velero to handle migration across clusters. Needs info Waiting for information
Projects
None yet
Development

No branches or pull requests

2 participants