Universal (HTTP/HTTPS, FTP, BitTorrent and Metalink) downloader, allowing mixed source protocols in CLI – impossible? Welcome to Aria2 world 🙂 Very short intro, skipping whole documentation and showing friendly software usage.
linux:~ # zypper search aria2
Loading repository data…
Reading installed packages…
S | Name | Summary | Type
–+——-+————————————————————+——–
| aria2 | Parallelizing Multi-Protocol Utility for Downloading Files | package
linux:~ # zypper install aria2
Loading repository data…
Reading installed packages…
Resolving package dependencies…
The following NEW package is going to be installed:
aria2
1 new package to install.
Overall download size: 1.0 MiB. After the operation, additional 3.9 MiB will be used.
Continue? [y/n/? shows all options] (y):
Retrieving package aria2-1.18.3-1.2.x86_64 (1/1), 1.0 MiB ( 3.9 MiB unpacked)
Retrieving: aria2-1.18.3-1.2.x86_64.rpm ……………………………………….[done (1.9 MiB/s)]
Checking for file conflicts: ……………………………………………………………[done]
(1/1) Installing: aria2-1.18.3-1.2 ………………………………………………………[done]
linux:~ #
I will skip whole documentation, setting, etc – and just uncover default behaviour in default installation.
Torrent downloading (magnet link)
Ok, so I love NBA – and want to download some torrent with NBA match. In Windows world i have no other favourite software except uTorrent. In linux world I used Deluge, Transmission. Now something CLI appeared…. let´s try it! 🙂 There are 2 ways how to obtain torrent file – direct download .torrent file or get magnet link. Let´s try if aria can handle second way! Magnet URL link obtained from torrent site:
linux:~ # aria2c 'magnet:?xt=urn:btih:75d287ca1fd65112f5b74510911d045716723da6&dn=NBA.2014.RS.%2822+mar%29.SA.Spurs.v.GS.Warriors.720p&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'
03/24 14:12:51 [ERROR] Exception caught while loading DHT routing table from /root/.aria2/dht.dat
Exception: [DHTRoutingTableDeserializer.cc:83] errorCode=1 Failed to load DHT routing table from /root/.aria2/dht.dat
03/24 14:12:51 [NOTICE] IPv4 DHT: listening on UDP port 6978
03/24 14:12:51 [NOTICE] IPv4 BitTorrent: listening on TCP port 6977
03/24 14:12:51 [NOTICE] IPv6 BitTorrent: listening on TCP port 6977
[#aafbd5 18KiB/18KiB(100%) CN:41 SD:5]
03/24 14:12:58 [NOTICE] Download complete: [METADATA]NBA.2014.RS.(22+mar).SA.Spurs.v.GS.Warriors.720p
*** Download Progress Summary as of Mon Mar 24 14:13:51 2014 ***
=======================================================================================================
[#373680 1.2MiB/1.8GiB(0%) CN:44 SD:23 DL:72KiB ETA:7h35m3s]
FILE: /root/Golden State Warriors – San Antonio Spurs 22.03.14.mkv
——————————————————————————————————-
*** Download Progress Summary as of Mon Mar 24 14:14:52 2014 ***
=======================================================================================================
[#373680 27MiB/1.8GiB(1%) CN:44 SD:7 DL:476KiB UL:54KiB(1.1MiB) ETA:1h8m5s]
FILE: /root/Golden State Warriors – San Antonio Spurs 22.03.14.mkv
——————————————————————————————————-
[#373680 86MiB/1.8GiB(4%) CN:44 SD:20 DL:448KiB UL:227KiB(12MiB) ETA:1h10m]^C
03/24 14:15:48 [NOTICE] Shutdown sequence commencing… Press Ctrl-C again for emergency shutdown.
[#373680 86MiB/1.8GiB(4%) CN:0 SD:0 DL:417KiB UL:199KiB(12MiB) ETA:1h15m10s]
[#373680 86MiB/1.8GiB(4%) CN:0 SD:0 DL:387KiB UL:167KiB(12MiB) ETA:1h21m5s]
*** Download Progress Summary as of Mon Mar 24 14:15:52 2014 ***
=======================================================================================================
[#373680 86MiB/1.8GiB(4%) CN:0 SD:0 DL:328KiB UL:160KiB(12MiB) ETA:1h35m42s]
FILE: /root/Golden State Warriors – San Antonio Spurs 22.03.14.mkv
——————————————————————————————————-
[#373680 86MiB/1.8GiB(4%) CN:0 SD:0 DL:328KiB UL:160KiB(12MiB) ETA:1h35m42s]
03/24 14:15:52 [NOTICE] Download GID#3736805670b749b8 not complete: /root/Golden State Warriors – San Antonio Spurs 22.03.14.mkv
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
aafbd5|OK | 0B/s|[MEMORY][METADATA]NBA.2014.RS.(22+mar).SA.Spurs.v.GS.Warriors.720p
373680|INPR| 508KiB/s|/root/Golden State Warriors – San Antonio Spurs 22.03.14.mkv
Status Legend:
(OK):download completed.(INPR):download in-progress.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See ‚-l‘ option in help/man page for details.
After some checking and gathering file name(s) aria started to downloading. I have interrupt downloading after few minutes.
Torrent downloading
linux:~ # aria2c http://crunchbang.org/torrents/crunchbang-11-20130506-amd64.iso.torrent
03/24 14:22:54 [NOTICE] Download complete: /root/crunchbang-11-20130506-amd64.iso.torrent
03/24 14:22:54 [NOTICE] IPv4 DHT: listening on UDP port 6917
03/24 14:22:54 [NOTICE] IPv4 BitTorrent: listening on TCP port 6948
03/24 14:22:54 [NOTICE] IPv6 BitTorrent: listening on TCP port 6948
[#11a975 29MiB/739MiB(4%) CN:44 SD:18 DL:4.0MiB ETA:2m56s]^C
03/24 14:23:06 [NOTICE] Shutdown sequence commencing… Press Ctrl-C again for emergency shutdown.
[#11a975 31MiB/739MiB(4%) CN:0 SD:0 DL:3.4MiB ETA:3m23s]
03/24 14:23:07 [NOTICE] Emergency shutdown sequence commencing…
03/24 14:23:07 [NOTICE] Download GID#11a9750f2505ab9f not complete: /root/crunchbang-11-20130506-amd64.iso
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
3c300a|OK | 109KiB/s|/root/crunchbang-11-20130506-amd64.iso.torrent
11a975|INPR| 2.3MiB/s|/root/crunchbang-11-20130506-amd64.iso
Status Legend:
(OK):download completed.(INPR):download in-progress.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See ‚-l‘ option in help/man page for details.
All worked extremely quick!
ISO downloading (3 sources)
As you can imagine, I can download 1 iso file from different sources via command:
linux:~ # aria2c http://debian.mirror.dkm.cz/debian-cd/7.4.0-live/i386/iso-hybrid/debian-live-7.4-i386-gnome-desktop.iso http://mirror.datacenter.by/debian-cd/7.4.0-live/i386/iso-hybrid/debian-live-7.4-i386-gnome-desktop.iso http://ftp.funet.fi/pub/linux/mirrors/debian-cdimage/7.4.0-live/i386/iso-hybrid/debian-live-7.4-i386-gnome-desktop.iso
[#df2a3c 46MiB/1.2GiB(3%) CN:3 DL:5.2MiB ETA:3m51s]^C
03/24 14:40:41 [NOTICE] Shutdown sequence commencing… Press Ctrl-C again for emergency shutdown.
03/24 14:40:41 [NOTICE] Download GID#df2a3c12a5f0ecb5 not complete: /root/debian-live-7.4-i386-gnome-desktop.iso
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
df2a3c|INPR| 5.2MiB/s|/root/debian-live-7.4-i386-gnome-desktop.iso
Status Legend:
(INPR):download in-progress.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See ‚-l‘ option in help/man page for details.
Incredibly fast again 🙂
Downloading few files from list
Let´s imagine i have a /tmp/dow.txt file containing these lines:
http://dl.amnesia.boum.org/tails/stable/tails-i386-0.23/tails-i386-0.23.iso
http://downloads.sourceforge.net/zentyal/zentyal-3.4-amd64.iso
http://downloads.sourceforge.net/sparkylinux/sparkylinux-3.3-x86_64-base.iso
http://downloads.sourceforge.net/sparkylinux/sparkylinux-3.3-x86_64-base.isoblablabla
Now I can very quickly run command:
linux:~ # aria2c -i /tmp/dow.txt
03/24 14:47:28 [ERROR] CUID#9 – Download aborted. URI=http://downloads.sourceforge.net/sparkylinux/sparkylinux-3.3-x86_64-base.isoblablabla
Exception: [AbstractCommand.cc:315] errorCode=3 URI=http://downloads.sourceforge.net/sparkylinux/sparkylinux-3.3-x86_64-base.isoblablabla
-> [HttpSkipResponseCommand.cc:215] errorCode=3 Resource not found
03/24 14:47:28 [NOTICE] Download GID#53928c4e928c06b2 not complete:
[DL:3.0MiB][#f45126 18MiB/896MiB(2%)][#d980f1 10MiB/719MiB(1%)][#6638a5 16MiB/576MiB(2%)]^C
03/24 14:47:44 [NOTICE] Shutdown sequence commencing… Press Ctrl-C again for emergency shutdown.
03/24 14:47:44 [NOTICE] Download GID#f45126363396c072 not complete: /root/tails-i386-0.23.iso
03/24 14:47:44 [NOTICE] Download GID#d980f1dc7253cb82 not complete: /root/zentyal-3.4-amd64.iso
03/24 14:47:44 [NOTICE] Download GID#6638a5cae4e24776 not complete: /root/sparkylinux-3.3-x86_64-base.iso
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
53928c|ERR | 0B/s|http://downloads.sourceforge.net/sparkylinux/sparkylinux-3.3-x86_64-base.isoblablabla
f45126|INPR| 1.1MiB/s|/root/tails-i386-0.23.iso
d980f1|INPR| 712KiB/s|/root/zentyal-3.4-amd64.iso
6638a5|INPR| 1.1MiB/s|/root/sparkylinux-3.3-x86_64-base.iso
Status Legend:
(ERR):error occurred.(INPR):download in-progress.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See ‚-l‘ option in help/man page for details.
As you can see, my tricky .isoblablabla extension was discovered! 🙂
Overall – this download manager is simply awesome!
-a-