IBM / aspera-cli

IBM Aspera CLI
Apache License 2.0
77 stars 17 forks source link

How to use ascli with Aspera cloud #169

Open xavierv79 opened 6 days ago

xavierv79 commented 6 days ago

Hi Team, We are using ascli with On prem aspera server. But when we try to configure the same with aspera cloud url its's not working for us. Please help us to resolve and provide some of ascli with cloud url.

Regards, Xavier

laurent-martin commented 5 days ago

did you try the wizard ?

ascli conf wiz

Else maybe give some details ?

xavierv79 commented 5 days ago

Hi Laurent,

We are able to configure with "ascli conf wiz" and work with it.

We need more details on command how to download a single file and folders and also from the "shared folders". Regards, Xavier

laurent-martin commented 5 days ago

I suggest maybe you read this section:

https://github.com/IBM/aspera-cli?tab=readme-ov-file#files

The AoC Files application lives in the command ascli aoc files, and to browse it is browse, and to download it is download, and to upload it is upload, to specify a destination folder: --to-folder=, and to specify a specific workspace --workspace=, and to specify no workspace, i.e. shared folders outside of workspace access: --workspace=@none:

ascli has a lot of options, for example to specify different transfer speed, you will use option --ts= .

The manual includes many examples.

xavierv79 commented 23 hours ago

Hi Laurent,

could you please provide the reference use "ascp" for aspera cloud.

Regards, Xavier

laurent-martin commented 23 hours ago

ascp is installed in ascli with command:

ascli conf ascp install

see https://github.com/IBM/aspera-cli#fasp-protocol-ascp

xavierv79 commented 23 hours ago

Hi Laurent,

Thanks a lot for sharing the details.

~]# ascli config ascp install Time: 00:00:01 ========================================================================================================================= 100% 1278 Mbps Time: 00:00:01 W, [2024-11-25T12:37:32.075476 #39975] WARN -- : Previous install exists, renaming folder. Installed IBM Aspera Transfer SDK version 1.1.3

In the above link we could not find the clear syntax for file upload and download through "ascp" with Aspera cloud URL. Kindly help with us.

Regards, Xavier

laurent-martin commented 23 hours ago

Apparently, here the SDK (ascp) was already installed.

You can get information on the ascp currently used with:

ascli conf ascp info
xavierv79 commented 23 hours ago

Hi Laurent,

Able to get ascp info.

We need details how to upload and download through "ascp" to Aspera cloud like below.

ASPERA_SCP_KEY=$(cat private key path) ascp --mode=send --host=<Server host iP > --user=<UserName> <Filename to upload with path>

ASPERA_SCP_KEY=$(cat private key path) ascp --mode=recv --host=<Server host iP>  --user=<UserName>  <Filename to download> <local directory to download>
laurent-martin commented 23 hours ago

First, note that the command you show , using ascp, are equivalent using ascli to:

ascli server --url=ssh://<Server host iP>:22 --username=<UserName> --ssh-keys=<private key path> upload <Filename to upload with path>

ascli server --url=ssh://<Server host iP>:22 --username=<UserName> --ssh-keys=<private key path> download <Filename to upload with path>

Likewise, for AoC, using the "Files" application in AoC, you can do:

ascli aoc files download <Filename to upload with path>
ascli aoc files upload <Filename to upload with path>

Assuming that ascli has been configured for aoc using the wizard: ascli conf wiz (Else, options --url , --username, --private-key can be provided)

xavierv79 commented 23 hours ago

Hi Laurent,

Thank you for sharing the details.

We are able to use ascli aoc files download ascli aoc files upload

We need confirm can we native "ascp" command to upload and download to aspera cloud like below.

ascp --mode=send --host=<Server host iP > --user= 

Regards, Xavier

laurent-martin commented 23 hours ago

100% of Aspera-based transfers lead to execution of ascp, and ascli is no exception.

If you execute ascli with options: --log-level=debug --log-secrets=yes then you will find in the logs the ascp command line executed.

The whole point of ascli, for the command line, is to call the appropriate APIs of AoC prior to starting ascp, as AoC requires the use of Bearer token, and is based on file ids, etc...

xavierv79 commented 22 hours ago

Hi Laurent,

Thank you for the confirmation. While we are using aspera on prem server we were able to use "ascli" as well "ascp" as separate command to transfer.
Our manger asking same way of transfer is possible or only with "ascli aoc".

Kindly help with this.

Regards, Xavier

xavierv79 commented 21 hours ago

Hi Laurent,

Could you please help with our above request.

Regards, Xavier

laurent-martin commented 21 hours ago

I have already answer:

Technically, yes, ascp is the base for any Aspera transfer, so in then whatever Aspera product you use, you can transfer using ascp command line.

But, if you connect to a simple HSTS with SSH credentials, then the ascp command line is rather simple, and contains basically the same information as for ascli. But if you transfer using AoC, then the authentication mechanism is more elaborate, and requires API calls prior to using ascp. Then, it's much easier to use ascli for that. Although technically ossible, using bare ascp in that case is not practical.

xavierv79 commented 19 hours ago

Hi Laurent, Thank you for the update.

Regards, Xavier