Last active
May 17, 2023 13:58
-
-
Save Alex-Yates/e427a93dc52dd84002741fef5fda9986 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: DO NOT BLINDLY RUN THIS FILE!!!! | |
:: It won't work. | |
:: Also, it's important you understand what each bit does. | |
:: Instead, step through it, one line at a time, reading the comments (::) as you go. | |
:: | |
:: STEP 0 - Download the rgclone command line | |
:: It's available here. (NOTE: You need to provide your own rgclone URL and port!): | |
:: https://rgclone-url.com:port/cloning-api/download/cli/windows-amd64 | |
:: | |
:: STEP 1 - Setting your RGCLONE_API_ENPOINT environemnt variable. | |
:: This command _PERMANENTLY_ sets your RGCLONE_API_ENDPOINT environemnt variable | |
setx RGCLONE_API_ENDPOINT https://rgclone-url.com:port/ | |
:: Now close your command prompt and open a new one. | |
:: Either use the Windows Control Panel to check your Environment Variables, or run the following to check it worked. | |
set RGCLONE_API_ENDPOINT | |
:: Should return the following: RGCLONE_API_ENDPOINT=https://rgclone-url.com:port/ | |
:: | |
:: STEP 2 - Authenticate against your rgclone instance. | |
:: The following command should open a web browser to authenticate against your rgclone server | |
rgclone auth | |
:: | |
:: STEP 3 - Explore available data-images | |
:: The following should return a list of available data-images | |
rgclone get data-images | |
:: | |
:: STEP 4 - Create your own data image | |
:: First, copy the pagila yaml file from the file share to some temp dir (in this case C:/temp) | |
:: Alternatively: https://gist.github.com/Alex-Yates/990b11b16557cd95e0bf17e123b80ccd (note, change the password) | |
:: Then, run the following to create your own postgres data image: | |
cd C:/temp | |
rgclone create data-image -f ./pagila.yaml | |
:: | |
:: STEP 5 - Review your data-containers | |
rgclone get data-containers | |
:: | |
:: STEP 6 - create data container | |
rgclone create data-container -i 66 -lifetime 1h -n foobar | |
:: | |
:: STEP 7 - view your data-container | |
rgclone get all | |
:: | |
:: STEP 8 - set up a proxy | |
rgclone proxy datacontainer foobar | |
:: | |
:: STEP 9 - share a data image with someone else | |
rgclone update data-image 9999 --user some.one@red-gate.com | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment