diff --git a/backup-testing/README.md b/backup-testing/README.md index 8c8f39f..94d4c2f 100644 --- a/backup-testing/README.md +++ b/backup-testing/README.md @@ -24,17 +24,9 @@ cd backup-testing 2. Make the scripts executable: ```bash -chmod +x setup-credentials.sh test-velero-backup.sh validate-restore.sh +chmod +x test-velero-backup.sh validate-restore.sh ``` -3. Set up your MinIO credentials: - -```bash -./setup-credentials.sh -``` - -This script will look for credentials in `~/.velero/credentials-velero` or prompt you to create them. - ## Running a Backup Test Execute the test script with appropriate parameters: @@ -44,34 +36,18 @@ Execute the test script with appropriate parameters: --s3-access-key \ --s3-secret-key \ --backup-name \ ---original-namespace mbgwp \ ---test-namespace mbgwp -``` - -```bash -./test-velero-backup.sh \ - --s3-access-key YOUR_ACCESS_KEY \ - --s3-secret-key YOUR_SECRET_KEY \ - --original-namespace immich +--original-namespace \ +--test-namespace ``` This will: -1. Create a temporary K3d cluster -2. Install Longhorn for storage -3. Install Velero configured to access your MinIO backup location -4. List available backups -5. Allow you to test restoring a specific backup ++ Create a temporary K3d cluster ++ Install Velero configured to access your MinIO backup location ++ List available backups ++ Allow you to test restoring a specific backup To restore a specific backup, run: -```bash -./test-velero-backup.sh \ - --s3-access-key YOUR_ACCESS_KEY \ - --s3-secret-key YOUR_SECRET_KEY \ - --original-namespace immich \ - --backup-name specific-backup-name -``` - ## Testing Specific Applications ### Immich @@ -80,25 +56,19 @@ For testing Immich backups: ```bash ./test-velero-backup.sh \ - --s3-access-key YOUR_ACCESS_KEY \ - --s3-secret-key YOUR_SECRET_KEY \ + --s3-access-key \ + --s3-secret-key \ + --backup-name immich \ --original-namespace immich \ - --test-namespace immich-test + --test-namespace immich + +kubectl port-forward service/helm-immich-server -n immich 8080:2283 ``` +Reachable on `localhost:8080` -### NextCloud -For testing NextCloud backups: -```bash -./test-velero-backup.sh \ - --s3-access-key YOUR_ACCESS_KEY \ - --s3-secret-key YOUR_SECRET_KEY \ - --original-namespace nextcloud \ - --test-namespace nextcloud-test -``` - -## Testing with Volume Snapshots +## Testing with Volume Snapshots (not tested yet) To test CSI volume snapshot backups: @@ -110,7 +80,7 @@ To test CSI volume snapshot backups: --include-volume-snapshots ``` -## Customizing Validation +## Customizing Validation (not tested yet) You can extend the `validate-restore.sh` script to perform application-specific validation checks: @@ -126,7 +96,7 @@ You can extend the `validate-restore.sh` script to perform application-specific --custom-validation-script ./your-custom-validation.sh ``` -## Troubleshooting +## Troubleshooting (not tested yet) If you encounter issues: diff --git a/backup-testing/test-velero-backup.sh b/backup-testing/test-velero-backup.sh index 5f60cbd..ef8c15f 100755 --- a/backup-testing/test-velero-backup.sh +++ b/backup-testing/test-velero-backup.sh @@ -271,7 +271,7 @@ else --namespace-mappings $ORIGINAL_NAMESPACE:$TEST_NAMESPACE \ --include-namespaces $ORIGINAL_NAMESPACE \ --exclude-namespaces kube-system,kube-public,kube-node-lease,velero \ - --exclude-resources certificates.cert-manager.io \ + --exclude-resources certificates.cert-manager.io \ --wait fi @@ -281,7 +281,7 @@ velero restore get # Wait for pods to be ready echo "Waiting for pods to be ready..." -kubectl wait --for=condition=ready pod --all -n $TEST_NAMESPACE --timeout=300s || true +kubectl wait --for=condition=ready pod --all -n $TEST_NAMESPACE --timeout=600s || true # 8. Run validation script (create it first if it doesn't exist) # if [[ ! -f ./validate-restore.sh ]]; then