Next: , Previous: , Up: Integration with existing software   [Index]

BitTorrent and huge files

If dealing with Integration with Git, web feeds and multimedia goes relatively fast, then BitTorrent and huge files consumes much time. You can not wait for downloads finish, but want to queue them after.

aria2 multi-protocol download utility could be used for solving that issue conveniently. It supports HTTP, HTTPS, FTP, SFTP and BitTorrent protocols, together with Metalink format. BitTorrent support is fully-featured: UDP trackers, DHT, PEX, encryption, magnet URIs, Web-seeding, selective downloads, LPD. aria2 can accelerate HTTP*/*FTP downloads by segmented multiple parallel connections.

You can queue you files after they are completely downloaded. contents:



if [ "$2" -eq 0 ]; then
    # downloaded .torrent/.metalink
    exit 0

if [ "$2" -gt 1 ]; then
    cd "$3"
    while [ "$(pwd)" != $TORRENTS_DIR ]; do
        name="$(basename "$(pwd)")"
        cd ..
    tartmp=$(mktemp ./finished.XXXXXX)
    tar cf $tartmp "$name"
    nncp-file $tartmp $REMOTE:"$name".tar
    rm $tartmp
    nncp-file "$3" $REMOTE:

Also you can prepare input file with the jobs you want to download:

$ cat jobs
$ aria2c \
    --on-download-complete \
    --input-file jobs

and all that downloaded (nncp.txz, nncp.txz.asc) files will be sent to remote.node when finished.