Using Ascp To Download By Command Line
Aspera Client User Guide
RedHat, Debian, Solaris, FreeBSD
Version 2.5.2
- Chapter 1 Introduction
- Affiliate 2 Setting Upwardly
- 2.1 Upgrade from a Previous Version
- ii.ii Installation
- ii.3 Enter the License Primal
- 2.4 Configure the Firewall
- 2.five Exam Transfer with the Aspera Demo Server
- 2.6 Optimize the Transfer Operation
- 2.7 Gear up Upwards the Public Key Authentication
- Chapter three ascp Command Reference
- 3.1 ascp Usage
- iii.2 ascp Examples
- 3.3 File Synchronization with Aspera Sync
- Appendix 1 Transfer Policies and Transfer Charge per unit
- ii Locating the Log Files
- 3 Uninstall Aspera Client
one. Introduction
Aspera Customer is a file transfer customer awarding supercharged with Aspera'due south fasp™ file transport technology. It includes the post-obit components:
- fasp™ transport server
- A transport server that accepts incoming connections.
- ascp Command
- A command-line transfer plan.
- Aspera Sync
- A command-line synchronization program.
The virtually up-to-appointment documentation tin can exist plant at http://asperasoft.com/support/documentation/scp-client. For further assistance, delight contact us at http://asperasoft.com/support.
ii. Setting Upward
ii.1 Upgrade from a Previous Version
If you accept 1 of the following products installed, follow these steps to set the organization for upgrade:
- Aspera Scp Client Version 2.0.2
- Aspera Scp Client Version two.one.x
- Aspera Scp Client Version 2.ii.1
- Step 1 Backup the old configuration files
- Backup the configuration files. Depending on the version of your current install, the file location may vary. To verify the version, use the command:
$ ascp -A
Y'all tin can find the version number preceding the Aspera SCP version. Fill-in the specified folders according to the version of your electric current install:
- 2.0.2+
-
- /opt/aspera/etc/
- User settings, license info
- Prior to ii.0.one
-
- /var/opt/aspera/etc/
- User settings, license info
- Step 2 Close all fasp transfer-related applications and connections.
- Before upgrading the application, close the following services:
- ascp connections
- SSH connections
- asperasync
two.two Installation
Follow these steps to set up the awarding:
- Step 1 Download the installer
- Download the installer from the link beneath. Apply the credentials provided to your organization by Aspera to access. If needed, contact Aspera Technical Back up in determining your house's admission credentials. http://world wide web.asperasoft.com/en/downloads/ii
- Step ii Run the installer
- With proper administrative permissions, execute the following commands to install the awarding. Replace the file name accordingly:
- RedHat
- $ rpm -Uvh aspera-scp-customer-[version].rpm
- Debian
- $ dpkg -i aspera-scp-client-[version].deb
- Solaris
- $ pkgadd -d aspera-scp-customer-[version].pkg
- FreeBSD
- 1. $ cd /usr/ports/misc/compat4x
2. $ brand
3. $ make install
4. $ make clean
v. $ cd /(the path to the installer bundle)
6. $ tar -xzvf aspera-scp-client-[version].tar
vii. $ sh aspera-scp-customer-[version].sh
8. $ kldload aio - On FreeBSD, reflect the binder name compat4x to your system'south settings. An boosted input/output processing called AIO (Asynchronous I/O) should exist loaded for Aspera fasp™ file transfer.
2.3 Enter the License Central
To install your production license, create the following file and copy the license cardinal string into it:
/opt/aspera/etc/aspera-license
When finished, utilise this command to verify the license info:
$ ascp -A
ii.4 Configure the Firewall
The Aspera transfer products require admission through the ports listed in the tabular array beneath. If you cannot establish the connectedness, review your local corporate firewall settings and remove the port restrictions:
-
- Allow outbound connection for the SSH. (TCP/22)
- Allow outbound connection for the fasp transfers. (Open up all UDP ports that the server allows, e.k. UDP/33001)
2.v Test with Aspera Demo Server
To make sure the software is working properly, follow these steps to test download and upload transfers between your system and the Aspera Demo Server.
- Step 1 Download from the Aspera Demo Server
- In this example, the transfer uses the following setup:
- Server accost:
- demo.asperasoft.com
- Server login:
- aspera / demoaspera
- File to download:
- /aspera-test-dir-big/100MB
- Download location:
- /tmp/
- Transfer Settings:
- Fair policy, target charge per unit 10M, minimum rate 1M, encryption disabled
$ ascp -QT -l 10M -thou 1M \
You should meet the session letters shown below. Description from left to right:
aspera@demo.asperasoft.com:aspera-exam-dir-large/100MB /tmp/- 100MB
- The file name
- 23%
- The pct completed
- 23MB
- The amount transferred
- 509Kb/s
- Current transfer rate
- 11:59 ETA
- Estimated time remaining
- Step 2 Upload to the Aspera Demo Server
- When the file is downloaded, try uploading the aforementioned file back to the Aspera Demo Server. Use the control to upload the file (100MB) to the Aspera Demo Server's /Upload directory. Enter the password demoaspera when prompted:
$ ascp -QT -l 10M -k 1M /tmp/100MB aspera@demo.asperasoft.com:Upload/
- Troubleshooting
-
- ascp: command not establish
- See two.two Installation and reinstall.
- Invalid license key
- See 2.three Enter the License Cardinal and verify the central.
- SSH ... failure leave code one
- See ii.4 Configure the Firewall and review the fasp firewall settings.
2.half dozen Optimize the Transfer Functioning
Aspera'south fasp™ transport has no theoretical throughput limit. Other than the network capacity, the transfer speed may exist limited by the rate settings and the resources of the computers. This section shows you the hardware upgrade guideline to improve the transfer speed.
- Hd
- The I/O throughput, the disk double-decker architecture (e.g. RAID, IDE, SCSI, ATA, and Fiber Channel).
- Network I/O
- The interface carte, the internal bus of the computer.
- CPU
- Overall CPU performance affects the transfer, specially when encryption is enabled.
two.seven Set Up the Public Key Hallmark
Public central authentication is an alternative to password authentication, assuasive users to authenticate without entering or storing a password. Setting upwardly public cardinal authentication involves generating a public and individual central-pair, and giving the public cardinal to servers you desire to transfer with.
To create a key-pair in guild to log in into other Aspera servers with the public primal authentication, follow these steps:
- Step i Create a SSH public key-pair
- Log in the account that will be initiating transfers, event following commands. The program will prompt you the public key file name, hit enter to apply the default name id_rsa. For a passphrase, yous can either enter a countersign or press return twice to leave information technology bare:
$ mkdir ~/.ssh
$ ssh-keygen -t rsa - Pace ii Provide the public key
- Provide your public key file to the ambassador of the server yous are connecting to. The public cardinal can be found in this path:
(home directory)/.ssh/id_rsa.pub
- Step three Connect with public key authentication
- In this case, the setup is equally follow:
- User account:
- jane
- Private primal:
- ~/.ssh/id_rsa
- File to send:
- my/files
- Server address:
- x.0.0.two
- Upload location:
- /space
- Transfer settings
- Fixed policy, target rate 10000(kbps), encryption disabled
$ ascp -T -l 10000 -i ~/.ssh/id_rsa my/files jane@10.0.0.2:infinite
3. ascp Control Reference
ascp is a core control-line plan for fasp™ transfers. This section covers the usage and examples.
3.1 ascp Usage
The bones ascp syntax guideline:
- The symbols used in the paths:
- Apply single-quote (' ') and forward-slashes (/) on all platforms
- Characters to avert in the file name:
- / \ " : ' ? > < & * |
If needed, you lot can employ the control to set the password, token, and cookie in the surround variables:
- Password:
- export ASPERA_SCP_PASS=the-password
- Token:
- consign ASPERA_SCP_TOKEN=the-token
- Cookie:
- export ASPERA_SCP_COOKIE=the-cookie
- Content Protection Countersign:
- consign ASPERA_SCP_FILEPASS=content-protect-password
- ascp
- [-{ATdpqv}] [-{Q|QQ}] [-l max-rate] [-m min-charge per unit] [-w{f|r} [-K probe-rate]]
[-k {0|1|two|3}] [-i pubkey-file] [-Z dgram-size] [-Thousand mgmt-port]
[-u user-string] [-X rexmsg-size] [-g read-size] [-G write-size]
[-S remote-ascp] [-L local-logdir] [-R remote-logdir][-e pre-post]
[-f config-file] [-C n-id:n-count] [-Eastward pattern1 -Due east pattern2...]
[-O fasp-port] [-P ssh-port] [-o Option1=ten[,Option2=y..]]
[-U {1|ii}] [-West token-cord] [-y {0|1}] [-j {0|i}]
[-Y key-file] [-I certif-file] [-t port] [-x proxy-server]
[[user@]host1:]source-file [[user@]host2:]target-path
- -A
- Display version and license information; so exit.
- -T
- Disable encryption for maximum throughput.
- -d
- Create target directory if it doesn't already be.
- -p
- Preserve file timestamp.
- -q
- Quiet flag, to disable progress display.
- -v
- Verbose mode, impress connection and authentication debug messages in the log file.
- -{Q|QQ}
- Enable fair (-Q) or trickle (-QQ) transfer policy. Utilise the -l and -m to gear up the target and minimum rates.
- -l max-rate
- Set up the target transfer rate in Kbps. Default: 10000
- -m min-rate
- Set the minimum transfer rate in Kbps. Default: 0
- -w{r|f}
- Test bandwidth from server to customer (r) or client to server (f). Currently a beta choice.
- -Grand probe-charge per unit
- Set probing rate (Kbps) when measuring clogging bandwidth.
- -k {0|1|2|3}
- Enable resuming partially transferred files. Default: 0, always retransfer
- 0 E'er retransfer the entire file.
- 1 Cheque file attributes and resume if they lucifer.
- 2 Check file attributes and practise a sparse file checksum; resume if they match.
- 3 Check file attributes and do a full file checksum; resume if they match.
- -i key-file
- Use public primal authentication and specify the individual key file. Typically, the private fundamental file is in the directory $HOME/.ssh/id_[algorithm].
- -Z dgram-size
- Specify the datagram size (MTU) for fasp™. By default it uses the detected path MTU.
- -M port
- Set a direction port for monitoring and controlling the transfer.
- -u user-cord
- Apply user cord, such equally variables for Pre- and Post-Processing, in the transfer.
- -X rexmsg-size
- Adjust the size in bytes of a retransmission request. Max: 1440.
- -1000 read-size
- Set up the read block size (in bytes). E.yard. 1M for i megabyte.
- -G write-size
- Set the write cake size (in bytes), E.grand. 1M for 1 megabyte.
- -S remote-ascp
- Specify the name of the remote ascp binary if dissimilar.
- -L local-log-dir
- Specify a logging directory in the local host, instead of using the default directory.
- -R remote-log-dir
- Specify a logging directory in the remote host, instead of using the default directory.
- -e pre-post
- Specify an alternating pre-mail service command. Apply complete path and file name.
- -f config-file
- Specify an alternate Aspera configuration file other than aspera.conf.
- -C n-id:north-count
- Employ parallel transfer on a multi-node/cadre system. Specify the node id (nid) and count(ncount) in the format 1:2, ii:two. Assign each participant an independent UDP port.
- -E pattern
- Exclude files or directories with the specified blueprint in the transfer. This option can be used multiple times to exclude many patterns. Up to 16 patterns can be used by using -E.
2 symbols can be used in the pattern: * represents nada to many characters in a string, for example "*.tmp" matches ".tmp" and "abcde.tmp". ? represents one character, for instance "t?p" matches "tmp" only not "temp". - -O fasp-port
- Set the UDP port used past fasp™ for data transfer. Default: 33001
- -P ssh-port
- Ready the TCP port used for fasp™ session initiation. Default: 22
- -o
- Avant-garde ascp options as listed beneath. Use comma "," to split up:
- SkipSpecialFiles=no
- Skip special files such as devices and pipes.
yes / no. Default: no - RemoveAfterTransfer=no
- Remove source file except binder when finish.
yes / no. Default: no - RemoveEmptyDirectories=no
- Remove empty folder on the source.
yes / no. Default: no - PreCalculateJobSize=no
- Calculate total size before transfer.
yes / no. Default: no - Overwrite=diff
- Overwrite files with the same proper name.
Default: diff, Takes the following values:- always Always overwrite the file.
- never Never overwrite the file.
- diff Overwrite if file is different from the source.
- older Overwrite if file is older than the source.
- FileManifest=none
- Generate a list of all transferred files information.
none / text. Default: none. - FileManifestPath=(path)
- Specify the path to store the manifested file.
text string, Default: undefined - FileCrypt=encrypt
- Encrypt or decrypt files. Passphrase is required.
encrypt / decrypt. Default: undefined. - RetryTimeout=(secs)
- Specify the timeout duration in seconds, for a retry attempt. Default: undefined
- -U {1|ii}
- Priority when sharing physical or virtual bandwidth cap. 1 for higher priority, two for regular. Default:ii
- -W token-string
- Specify the token string for the transfer.
- -y {0|1}
- Enable HTTP Fallback transfer server when UDP connection fails. Gear up i to enable.
0 / one. Default: 0 - -j {0|1}
- Encode all HTTP transfers every bit JPEG files. Set i to enable. 0 / one. Default: 0
- -Y cardinal-file
- The HTTPS transfer'due south central file proper noun.
- -I certif-file
- The HTTPS certificate's file name.
- -t port
- Specify the port for HTTP Fallback Server.
- -10 proxy-server
- Specify the proxy server address used by HTTP Fallback.
3.ii ascp Examples
- i.
- Transfer all files in \local-dir\files to 10.0.0.2 with target rate 100 Mbps and encryption OFF:
$ ascp -T -l 100000 /local-dir/files root@10.0.0.two:/remote-dir
- 2.
- Transfer with fair rate policy, with maximum charge per unit 100 Mbps and minimum at 1 Mbps:
$ ascp -TQ -l 100000 -m thou /local-dir/files root@10.0.0.2:/remote-dir
- 3.
- To perform a transfer with UDP port 42000:
$ ascp -l 100000 -O 42000 /local-dir/files user@10.0.0.2:/remote-dir
- 4.
- To perform a transfer with the public fundamental authentication, using the key file (home directory)/.ssh/asp1-key:
$ ascp -T -l 10000 -i ~/.ssh/asp1-cardinal local-dir/files root@10.0.0.two:/remote-dir
- 5.
- Enclose the target in double-quotes when spaces are nowadays in the username and remote path:
$ ascp -l 100000 local-dir/files "User Name@10.0.0.2:/remote directory"
- 6.
- Send files to a network shares location \\i.two.three.4\nw-share-dir, through the computer 10.0.0.ii:
$ ascp local-dir/files root@10.0.0.2:"//1.ii.three.4/nw-share-dir/"
- 7.
- Apply parallel transfer on a dual-core system, together transferring at the rate 200Mbps, using UDP ports 33001 and 33002. Two commands are executed in different terminal windows:
$ ascp -C 1:2 -O 33001 -l 100m /file root@10.0.0.2:/remote-dir &
$ ascp -C two:ii -O 33002 -fifty 100m /file root@x.0.0.2:/remote-dir - 8.
- Upload the file space\files to the server 10.0.0.2 with password protection (password: underground):
$ ASPERA_SCP_FILEPASS=clandestine ascp -fifty 10m -o FileCrypt=encrypt local-dir/files \
Download from the server 10.0.0.ii and decrypt while transferring:
root@ten.0.0.2:/remote-dir/$ ASPERA_SCP_FILEPASS=secRet ascp -50 10m -o FileCrypt=decrypt \
If the password-protected file is downloaded without descrypting (file1.aspera-env, with aspera-env appended), on the local figurer, descrypt the file as file1:
root@x.0.0.2:/remote-dir /local-dir$ ASPERA_SCP_FILEPASS=secRet asunprotect -o file1 file1.aspera-env
3.three File Synchronization with Aspera Sync
Aspera Sync is a characteristic that tin be used to monitor configured "hot folders" for changes, automatically transferring whatsoever new or modified files. It tin exist used for 1-mode replication between two locations or but every bit a fashion of forwarding files in your work-flow. Sync runs equally a service in the background.
Aspera Sync is a control-line tool that can be used to monitor configured "hot folders" for changes, automatically transferring any new or modified files. Information technology can be used for one-style replication between two locations or merely as a way of forwarding files in your work-menstruation. Sync runs as a service in the background.
The post-obit shell script is used to execute Aspera Sync:
/opt/aspera/bin/asperasync.sh
You tin can modify the Aspera Sync transfer settings straight in this file. For instance, the Aspera Sync is initiated every 10 seconds with target charge per unit 100Mbps (100000Kbps), you lot can change them past modifying the values of INTERVAL and TARGETRATE in this file, respectively:
...
INTERVAL=x# Interval for directory sync is in seconds
TARGETRATE=100000# The highest rate the sync will try to achieve.
...
three.3.ane asperasync.sh Syntax
To execute the Aspera Sync, employ the control asperasync.sh with the following syntax:
$ ASPERA_SCP_PASS=pswd /opt/aspera/bin/asperasync.shsrc-dirdes-dirarg
- pswd
- The password for remote login. Use the surround variable ASPERA_SCP_PASS to ready information technology.
- src-dir
- The source folder.
- des-dir
- The destination folder. Either the source or the destination binder has to be a local directory on your computer. The parameter on the remote-side takes the form user@remote-address.
- arg
- The ascp transfer options for this synchronization. Come across 3. ascp Command Reference.
iii.3.2 Aspera Sync Examples
- 1.
- To offset a regular synchronization with the setup:
- Remote Login asp1 / 1234
- Source (Local)
- Source Folder /local-src
- Destination ten.0.0.v (Remote)
- Destination Folder /remote-dest
$ ASPERA_SCP_PASS=1234 /opt/aspera/bin/asperasync.sh/local-src \
asp1@ten.0.0.5:/remote-dest - ii.
- To first the same synchronize, with additional ascp command options:
- ascp Options Target charge per unit 10Mbps (-l 10000), resume with a total file checksum(-k3)
$ ASPERA_SCP_PASS=1234 /opt/aspera/bin/asperasync.sh /local-src \
asp1@10.0.0.v:/remote-dest-l 10000 -k3 - 3.
- To get-go the aforementioned synchronization, and continue the script running when the Terminal session is closed. Commencement the command with the nohup command, and add together a & symbol at the end:
$ ASPERA_SCP_PASS=1234
$ nohup /opt/aspera/bin/asperasync.sh /local-src \
asp1@ten.0.0.v:/remote-dest& - iv.
- To synchronize from a network shares location, through a remote host, to a local directory:
- Remote Login: asp1 / 1234
- Source IP: 10.0.0.ten (Remote)
- Source Folder: \\1.two.3.4\nw-share-src (Network Shares drive)
- Destination: (Local)
- Destination Folder: /inbox
$ ASPERA_SCP_PASS=1234 /opt/aspera/bin/asperasync.sh \
asp1@10.0.0.10:"//one.2.3.iv/nw-share-src" /inbox
Appendix 1. Transfer Policies and Transfer Rate
The transfer policy and speed determine how you utilize the network resource for fasp™ file transfers. Four transfer policies described below:
- Stock-still
- fasp™ attempts to transfer at the specified target rate, regardless of the bodily network chapters. This policy transfers at a abiding charge per unit and finishes in a guaranteed fourth dimension. In this fashion, a maximum (target) rate value is required.
- Loftier
- fasp™ monitors the network and adjusts the transfer charge per unit to fully utilize the available bandwidth up to the maximum rate. When congestion occurs, a fasp™ session with high policy transfers at a rate twice of a session with fair policy. In this fashion, both the maximum (target) and the minimum transfer rates are required.
- Fair
- fasp™ monitors the network and adjusts the transfer charge per unit to fully utilize the bachelor bandwidth upwards to the maximum rate. When other types of traffic builds upwardly and congestion occurs, fasp™ shares bandwidth with other traffic adequately by transferring at an even rate. In this mode, both the maximum (target) and the minimum transfer rates are required.
- Low
- Like to Off-white style, the low policy uses the bachelor bandwidth upward to the maximum rate, but much less aggressive when sharing bandwidth with other network traffic. When congestion builds up, the transfer rate is decreased all the fashion downwardly to the minimum rate, until other traffic retreats.
Appendix 2. Locating the Log Files
The log file includes detailed transfer information and can exist useful for review and support request. The file tin be found in the location:
- RedHat, FreeBSD
- /var/log/messages
- Debian
- /var/log/syslog
- Solaris
- /var/adm/messages
This example shows you lot how to separate Aspera'south log file from the system's log. Bank check the syslog.conf manual (man syslog.conf) for precise instructions for your arrangement:
- Step ane Locate the arrangement log settings
- Open the file:
/etc/syslog.conf
In the file, find the line that sets the system log. For example:*.info;mail.none;authpriv.none;cron.none /var/log/messages - Pace ii Assign the Aspera Log to another file
- To separate the Aspera transfer products' log from the system log, do the post-obit modifications:
- Add local0.none and local2.none to the located line.
- Add another line to forrard local0.info and local2.info log messages to a file.
With this modification, the Aspera's log will be stored in the file:*.info;postal service.none;authpriv.none;cron.none;local0.none;local2.none \
/var/log/messages
local0.info;local2.info -/var/log/aspera.log/var/log/aspera.log
Appendix 3: Uninstall Aspera Customer
To uninstall the product, use the following commands. For RedHat and Debian, replace the Package-name with the printed name from the showtime command:
- RedHat
- $ rpm -qa |grep aspera
$ rpm -e Packet-proper noun - Debian
- $ dpkg -l "aspera*"
$ dpkg -r Package-name - Solaris
- $ pkgrm ASPRclnt
- FreeBSD
- $ sh /opt/aspera/var/uninstall.sh
Copyright 2009 © Aspera Inc. All Rights Reserved
DOWNLOAD HERE
Posted by: walkerbuty1936.blogspot.com
Post a Comment