From eb9c6fa7d228c98c7d842c31d6077f97261b5a41 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:07:12 -0600 Subject: [PATCH] Update documentation --- docs/operations/data_migration.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/operations/data_migration.md b/docs/operations/data_migration.md index e2af2b2ff..2946228fb 100644 --- a/docs/operations/data_migration.md +++ b/docs/operations/data_migration.md @@ -94,9 +94,24 @@ Load migration data onto a production or sandbox environment **WARNING:** All files uploaded in this manner are temporary, i.e. they will be deleted when the app is restaged. Do not use this method to store data you want to keep around permanently. -#### STEP 1: Use scp to transfer data +#### STEP 1: Using cat to transfer data to sandboxes + +```bash +cat {LOCAL_PATH_TO_FILE} | cf ssh {FULL_NAME_OF_YOUR_SANDBOX_HERE} -c "cat > /home/vcap/tmp/{DESIRED_NAME_OF_FILE}" +``` + +* FULL_NAME_OF_YOUR_SANDBOX_HERE - Name of your sandbox, ex: getgov-za +* LOCAL_PATH_TO_FILE - Path to the file you want to copy, ex: src/tmp/escrow_contacts.daily.gov.GOV.txt +* DESIRED_NAME_OF_FILE - Use this to specify the filename and type, ex: test.txt or escrow_contacts.daily.gov.GOV.txt + + +#### STEP 1 (Alternative): Using scp to transfer data to sandboxes +**IMPORTANT:** Only follow these steps if cat does not work as expected. If it does, skip to step 2. + CloudFoundry supports scp as means of transferring data locally to our environment. If you are dealing with a batch of files, try sending across a tar.gz and unpacking that. + + ##### Login to Cloud.gov ```bash