The fastest way to get a large drive off your account is through the API, using our command line download tool. It transfers in chunks, shows progress as it goes, and can resume if your connection drops, which matters on a transfer that may run for hours.
Before you start
Shut down the server the drive is attached to. Copying a drive while its server is running gives you a crash consistent image, the same as pulling the power cord out, and it may not boot cleanly.
You need bash. On Windows, install Cygwin, which provides a Linux like environment. When you run the Cygwin installer, add the curl, gzip and coreutils packages. Add qemu as well if you will want to convert the image to another format afterwards, and a text editor such as nano.
Download the tool
You need to be logged in. The script is linked from your profile page under API Tools, or download it directly:
- JHB1: go2cloud-download.sh
- JHB2: go2cloud-download.sh
Set your endpoint and credentials
Both lines are shown on that same page, ready to copy:
export G2CURI=https://api-jhb1.go2cloud.co.za
export G2CAUTH=<account-uuid>:<api-key>Use api-jhb2.go2cloud.co.za if your account is in JHB2.
Run the download
./go2cloud-download.sh <drive-uuid> <filename>The drive UUID comes from the control panel, and the filename is whatever you want the image saved as on your machine. For example:
./go2cloud-download.sh 08c92dd5-70a0-4f51-83d2-835919d254df myserver.imgIf you would rather not look up the UUID, run it with no arguments and it will list your drives and let you pick one:
./go2cloud-download.shIf the download is interrupted
Run exactly the same command again. It works out how far it got from the size of the file on your machine and carries on from there. You do not need to start again.
Writing onto an attached drive instead of a file
The download tool can also write straight onto an attached blank drive rather than to a file. The target is overwritten, so check the device name with lsblk before you start.
A download onto a raw disk cannot resume by itself, because there is no file size to measure progress from. If it is interrupted, use the offset the script prints with the -o option.
The other option: SFTP
If you would rather use a graphical client such as FileZilla or WinSCP, you can reach your drives over SFTP:
Host: ftp.go2cloud.co.za (JHB1 accounts)
ftp-jhb2.go2cloud.co.za (JHB2 accounts)
Port: 22
Username: your account UUID
Password: your secret API keyBoth values are on your profile page, under API Tools.
SFTP is convenient for smaller images. For anything large, the API tool is the better choice, because it transfers in chunks, shows progress, retries by itself if the connection drops, and resumes rather than starting over.
Converting the image afterwards
The image comes down as a raw disk image. To use it elsewhere, convert it with qemu-img. See converting images.