If you have created a workspace export that is very large and contains many data parts, it may not be practical to download them all via your web browser and a laptop or desktop computer, as various factors (including internet connection quality and longevity, local filesystem space constraints, and security concerns) may conspire towards a poor outcome.
You may instead wish to opt for a scripted download that can be run on a device of your choosing, and does not require you to keep web browser tabs open and active, or to maintain an uninterrupted internet/wifi connection with your laptop if you transport it to different locations. To this end, we have provided a Python script attached to this article (navigate to the bottom of the article to download) which can be run non-interactively to perform an automated and resilient download of a workspace export.
Prerequisites
Download the python script attached at the bottom of this article.
You will need Python 3.x installed, most linux and MacOS computers have python pre-installed, but it can be downloaded here. You will also need the requests and boto3 python libraries installed, which you can install with PIP using the following command (or an equivalent command for your Python package manager of choice):
python3 -m pip install requests boto3
Finally, the script requires that you generate and use an API key for your Geneious Cloud account. If you do not already have an API key, see Managing API Keys for information on how to create one. If API keys are not enabled for your organization, but it is not practical for you to download your workspace export directly from the Geneious Cloud web interface, please contact support for assistance.
Please note that your user must have the Admin role in order to be able to create and download workspace export data.
Usage
Basic usage of the script is as follows:
python3 download_workspace_export.py --geneious-cloud-api-url https://api.geneious.eu <api-key> <workspace-export-id>
Simply replace the <api-key> and <workspace-export-id> with your own and run this command in a terminal of your computer.
The workspace export id can be obtained from the web interface as per the below screenshot
Further Details
The usage example above assumes that your organization is located in our EU regional instance, which will be the case for most users. However, if you are located in the US regional instance (i.e. you access the web interface at https://biologics.geneious.com or https://app.geneious.com), then you will need to specify https://api.geneious.com for the --geneious-cloud-api-url argument.
The script will download all workspace export data files (each of which is one part of a multi-part zip archive) in order, and should recover from most transient errors. In the event of a fatal error, you can resume from where it left off by observing from the script output which part number it was trying to download when it failed and then resuming from that part number like so:
python3 download_workspace_export.py --geneious-cloud-api-url https://api.geneious.eu --from-part-number <part-number> <api-key> <workspace-export-id>
Note that part numbers begin at 1, but regardless of which number you enter, the script will start downloading from the first valid part number that is greater than or equal to the number you enter.
Once the download completes, you will need to extract your data from the multiple zip files that have been downloaded, before it can be re-imported into Geneious Prime, or other programmes. Most operating systems have built-in tools to automatically extract the multi-part zip files by right clicking on the first data file and selecting 'extract'. This will extract the data into a folder structure containing your entire workspace with all your documents within. A dedicated tool such as 7-zip can also be downloaded and used to extract all the multi-part zip files into a folder tree.
It is advisable that if you are downloading large workspace exports in this way, you do so from a computer that will remain online for the duration of the download, has a high quality internet connection, and access to sufficient storage space to store the entire export.
If you encounter any issues running this script, please contact support for further assistance, and include details of the command(s) you ran and any output that was logged by the script. Do NOT include your actual API key in the command or in any correspondence with support, as this should never be shared with anyone.