Utilities to check instrument uploads by Data Mover
Introduction
Two command line utilities have been developed to check the instrument uploads done by Mediaflux Data Mover. They are:
- instrument-upload-list
- A tool to list or search instrument data uploads in Mediaflux.
- instrument-upload-missing-find
- A tool to search local directories that have not been uploaded to Mediaflux, or the local directories do not match the total file count or size of the uploads in Mediaflux.
Installation on Windows 10
- Download latest unimelb-mf-clients for Windows from UoM GitLab site
- Unzip unimelb-mf-clients-x.x.x-windows-x64.zip
- Add unimelb-mf-clients commands to PATH environment variable. If you unpacked the zip file to C:\Apps\unimelb-mf-clients-x.x.x, you can follow the instructions below to add its commands to PATH environment variable, so that you do not need to enter the command's full paths when executing them:
- Search "environment variables" in Windows search bar , then select "Edit environment variables for your account"
- In the "Environment Variables" window, select "Path" from the User Variables list, click "Edit..." button to edit it.
- In the "Edit environment variable" window, click "New" button, then enter the path: C:\Apps\unimelb-mf-clients-x.x.x\bin\windows
Click OK button to save the variable.
- Create configuration file at %userprofile%\.Arcitecta\mfux.cfg
Open Command Prompt, create .Arcitecta folder by entering the command below:
mkdir .Arcitecta
- Run command below in Command Prompt to create the config file:
notepad .Arcitecta\mflux.cfg
- When asked Click "Yes" to create the file.
- In Notepad, enter the Mediaflux server details and token(Note: you need to get the token from Mediaflux support team):Â
- When asked Click "Yes" to create the file.
host=mediaflux.researchsoftware.unimelb.edu.au port=443 transport=https token=XXX_YOUR_TOKEN_XXX
Run the commands on Windows 10
After unimelb-mf-clients-x.x.x is installed on your Windows 10 PC, you can now execute the two commands in Command Prompt.
Open Command Prompt
To open Command Prompt, enter "cmd" in Windows search bar, then select "Command Prompt".
Show usage of the two commands
You can use -h option get synopsis of the two commands:
instrument-upload-list -h
or
instrument-upload-missing-find -h
If you have not added the commands to Path environment variable, you will need to specify the fulls to the commands, for example:
C:\Apps\unimelb-mf-clients\bin\windows\instrument-upload-list -h
or
C:\Apps\unimelb-mf-clients\bin\windows\instrument-upload-missing-find -h
Examples
instrument-upload-missing-find examples
Find the sub-directories under a specified parent that have not been uploaded by Mediaflux Data Mover:
instrument-upload-missing-find -i 1024 "D:\Data"
The above command will check all the (direct) sub-directories of "D:\Data", and list the ones not yet uploaded to instrument shareable (id=1024).
Find the sub-directories of multiple parent directories:
instrument-upload-missing-find -i 1024 "D:\Data" "E:\Data2\2021" "E:\Data3\2022"
The above command specifies multiple parent directories and it will scan all the three directories.
Check only the recent data, by specifying
-a
or--after
option:instrument-upload-missing-find -i 1024 --after today-7day "D\Data"
The above command will only check the (direct) sub-directories modified in the last seven days.
Save the result to CSV file using
-o
or--output-csv
Âinstrument-upload-missing-find -i 1024 -o C:\Documents\missing-dirs.csv "D\Data"
The command above will save the result a CSV file and you can view it with Excel.
instrument-upload-list examples
List all uploads of the specified instrument shareable (id=1024):
instrument-upload-list -i 1024
The command above lists all the uploads to the specified instrument shareable (id: 1024)
List the uploads completed in the last 7 days using
-a
or--after
optioninstrument-upload-list -i 1024 -a today-7day
The command above lists the uploads completed in the last 7 days
Save the result to CSV file using
-o
 or--output-csv
option:instrument-upload-list -i 1024 -o C:\Documents\1024_uploads.csv
Sort the result in newest-to-oldest order:
instrument-upload-list -i 1024 --newest-to-oldest
Compare total file size with the corresponding local source directories (if they exist) using
-c
 or--compare
switch:instrument-upload-list -i 1024 --compare
The above command tries to find the local source directories and compare total file sizes.
Filter uploads by keyword:
instrument-upload-list -i 1024 -k "abc"
The above command returns the uploads have keyword: abc
Filter uploads by recipient user email address:
instrument-upload-list -i 1024 --share-with a.user@unimelb.edu.au
The command above returns the uploads shared with the specified email address.
Filter uploads by source path:
instrument-upload-list -i 1024 -p C:\Data\dataset2022_11_11
The command above returns the upload(s) matches the source path.