aria2 icon indicating copy to clipboard operation
aria2 copied to clipboard

How to resume a download use '.aria2' file

Open iahu opened this issue 7 years ago • 43 comments

Can I resume a download task use '.aria2' file ?

iahu avatar Dec 02 '16 09:12 iahu

aria2 creates a file whose name is the same as the file you are downloading and has a suffix ".aria2" (e.g., foo.txt.aria2). It is called control file. It contains all information to resume download. Note that control file must exist in the same directory with the downloading file.

tatsuhiro-t avatar Dec 03 '16 07:12 tatsuhiro-t

Thanks @tatsuhiro-t . I really searched how to do the resume job, but could not got a example. Could you give a example usage of it for me ? Thanks again.

iahu avatar Dec 03 '16 08:12 iahu

When you hit ctrl-C while downloading is still in progress, aria2 leaves control file. Running the same command line, aria2 starts resuming last download.

tatsuhiro-t avatar Dec 04 '16 01:12 tatsuhiro-t

Is it possible to restart the download without the original link, but only the .aria2 file? I want to resume my torrent and can't find the tracker...

HaleTom avatar Apr 15 '17 12:04 HaleTom

Changing tracker is no problem as long as the info hash stays the same.

tatsuhiro-t avatar Apr 15 '17 13:04 tatsuhiro-t

How do I use the info hash in the .aria2 to resume the download without finding a new magnet/download link?

HaleTom avatar Apr 16 '17 05:04 HaleTom

https://aria2.github.io/manual/en/html/technical-notes.html describes the format of .aria2 control file. Once the info hash is obtained, then creating magnet link is easy.

tatsuhiro-t avatar Apr 16 '17 05:04 tatsuhiro-t

I think @HaleTom is looking for a command line option or something similar to resume a download without knowing the original download link, using only the .aria2 file.

IamCarbonMan avatar May 03 '17 05:05 IamCarbonMan

@IamCarbonMan Yup, a user shouldn't need to dig into a file-format specification to resume a magnet download.

HaleTom avatar May 04 '17 08:05 HaleTom

I'm also looking for the solution of resume without link, please tell me if anyone knows. Thank you!

matiffeder avatar Jun 13 '17 18:06 matiffeder

@HaleTom That is exactly what I thought .aria2 files were supposed to do.

UNIX-like systems users are privileged in this case, because the majority of them use bash by default that comes with history and it's pretty easy to re-enter the original command to resume your download.

What about those poor Windows users?

Indeed it would be more than awesome to have such an option by default as you have suggested.

What it would be nice, would be to have something like a new flag that builds config settings for each download:

aria2c --build-config <magnet-link>

After you interrupt it and want to resume, all you must do would be something like:

aria2c --use-config <aria2-file>.aria2

This config should reside in the same location where the file is downloaded and as soon as the file gets downloaded successfully to get deleted automatically.

@tatsuhiro-t Does it sound silly as an idea?

stefanos82 avatar Jun 29 '17 13:06 stefanos82

Hi @HaleTom , I write a tools to transform .aria2 file to a magnet link http://alphatr.github.io/aria2-reader.html

alphatr avatar Aug 02 '17 15:08 alphatr

@stefanos82 I use uget as a front-end to aria2c, so I can't use my bash history :(

HaleTom avatar Aug 04 '17 09:08 HaleTom

@HaleTom no worries.

May I ask what operating system are you using? I could suggest an alternative to your issue as a workaround.

stefanos82 avatar Aug 04 '17 09:08 stefanos82

@stefanos82 I'm using Manjaro linux. I've temporarily switched to using deluge for torrents. Still, I am interested in your suggestion, and others may be, too.

HaleTom avatar Aug 04 '17 09:08 HaleTom

Perfect! The workaround is rather simple: just install ClipIt clipboard manager in case you haven't installed it already and use the link(s) from your clipboard manager history to resume any link you want.

Just make sure you have your link(s) copied to clipit; that's how I roll to be honest with you. It's easier to press Ctrl+C than having to look into my browser history to find that website I downloaded that file.

stefanos82 avatar Aug 04 '17 09:08 stefanos82

@HaleTom I have downloaded uget and played a bit with it. It's a pretty straight-forward application and lets you resume your magnet links by default.

It comes bundled with clipboard monitoring support and not only that, it logs everything you download or delete.

The only way aria2 would not resume your magnet link with uget would be when you delete the folder that contains the downloaded content without deleting your .aria2 file; this way will restart the download from the start.

Is this your case?

stefanos82 avatar Aug 04 '17 11:08 stefanos82

I need to resume aria2c files as well how do I resume from cmd line

markmark1 avatar Oct 24 '17 13:10 markmark1

i write cmd tool to parse the .aria2 file with python. it can extract magnet link from the control file. check https://github.com/smasterfree/aria-control-file-parser :)

smasterfree avatar Nov 19 '17 09:11 smasterfree

Thank you for your help! Wow how to use this

On Nov 19, 2017 at 1:44 AM, <huang (mailto:[email protected])> wrote:

i write cmd tool to parse the .aria2 file with python. it can extract magnet link from the control file. check https://github.com/smasterfree/aria-control-file-parser :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/aria2/aria2/issues/792#issuecomment-345504191), or mute the thread (https://github.com/notifications/unsubscribe-auth/AGHom5rdpWx21EQIlZ_Ao9yBuv_Wt1suks5s3_iWgaJpZM4LCWNS).

markmark1 avatar Nov 19 '17 11:11 markmark1

i update readme and add a cmd line warpper.

how to run

python aria2_to_magnet.py -f dahufa.aria2

output

magnet:?xt=urn:btih:959E2ECEB954313D3869EFF7924CA7CD8DE739

smasterfree avatar Nov 19 '17 12:11 smasterfree

Thanks, I'll check it out.

On Nov 19, 2017 at 4:08 AM, <huang (mailto:[email protected])> wrote:

i update readme and add a cmd line warpper.

how to run

python aria2_to_magnet.py -f dahufa.aria2

output

magnet:?xt=urn:btih:959E2ECEB954313D3869EFF7924CA7CD8DE739

— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/aria2/aria2/issues/792#issuecomment-345511710), or mute the thread (https://github.com/notifications/unsubscribe-auth/AGHom76ZTc7qjJeOQ4JVQ7cGLiInunmOks5s4BpUgaJpZM4LCWNS).

markmark1 avatar Nov 20 '17 07:11 markmark1

Could not find the magnet link from aria2 using your tools @alphatr @smasterfree , does that mean it is impossible to resueme downloading from .aria2 file?

see attachment for example S.mp4.aria2.zip

kiinoo avatar Jul 22 '18 00:07 kiinoo

@kiinoo

yes, maybe a broken control file?

smasterfree avatar Jul 24 '18 08:07 smasterfree

no, it is a regular file. but maybe it is not a 'magnet' file so we can extrac the link? (im not familiar with magnet/bittorrent concepts)

kiinoo avatar Jul 25 '18 13:07 kiinoo

I was downloading a large 15GB file with Steinberg Download Assistant that is using Aria2. There was a power cut and now it won't resume the 90% complete download, I have Cubase_LE_AI_Elements_10.0.40_Installer_win.zip.sda-download and Cubase_LE_AI_Elements_10.0.40_Installer_win.zip.sda-download.aria2 Cubase_LE_AI_Elements_10.0.40_Installer_win.zip.sda-download.aria2.zip How can I resume this ? is there a front end for windows that I can add the aria2 file to or do I do it with a command line in Windows ?

MusoCity avatar Sep 29 '19 22:09 MusoCity

@MusoCity Have you tried to use the -c | --continue command so you can resume your download?

stefanos82 avatar Sep 29 '19 22:09 stefanos82

Yes, I got aria2c -c Cubase_LE_AI_Elements_10.0.40_Installer_win.zip.sda-down load.aria2 Exception caught Exception: [download_helper.cc:451] errorCode=1 Unrecognized URI or unsupported protocol: Cubase_LE_AI_Elements_10.0.40_Installer_win.zip.sda-download.aria2

MusoCity avatar Sep 29 '19 22:09 MusoCity

That's not how you download your file I'm afraid...you need the original link you first started the download so you can resume the whole procedure.

On what operating system are you, Windows, Mac, or GNU / Linux?

stefanos82 avatar Sep 29 '19 22:09 stefanos82

It's Win, the Steinberg Download Assistant lets you pick the item to download so you don't get a link SDA

MusoCity avatar Sep 29 '19 22:09 MusoCity