-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to resume a download use '.aria2' file #792
Comments
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. |
Thanks @tatsuhiro-t . I really searched how to do the resume job, but could not got a example. |
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. |
Is it possible to restart the download without the original link, but only the |
Changing tracker is no problem as long as the info hash stays the same. |
How do I use the info hash in the |
https://aria2.github.io/manual/en/html/technical-notes.html describes the format of .aria2 control file. |
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 Yup, a user shouldn't need to dig into a file-format specification to resume a magnet download. |
I'm also looking for the solution of resume without link, please tell me if anyone knows. Thank you! |
@HaleTom That is exactly what I thought UNIX-like systems users are privileged in this case, because the majority of them use 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? |
Hi @HaleTom , I write a tools to transform |
@stefanos82 I use |
@HaleTom no worries. May I ask what operating system are you using? I could suggest an alternative to your issue as a workaround. |
@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. |
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 |
@HaleTom I have downloaded It comes bundled with clipboard monitoring support and not only that, it logs everything you download or delete. The only way Is this your case? |
I need to resume aria2c files as well how do I resume from cmd line |
i write cmd tool to parse the .aria2 file with python. it can extract magnet link from the control file. |
Thank you for your help! Wow how to use this
…
On Nov 19, 2017 at 1:44 AM, <huang ***@***.***)> 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 (#792 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AGHom5rdpWx21EQIlZ_Ao9yBuv_Wt1suks5s3_iWgaJpZM4LCWNS).
|
i update readme and add a cmd line warpper. how to run
output
|
Thanks, I'll check it out.
…
On Nov 19, 2017 at 4:08 AM, <huang ***@***.***)> 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 (#792 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AGHom76ZTc7qjJeOQ4JVQ7cGLiInunmOks5s4BpUgaJpZM4LCWNS).
|
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 |
yes, maybe a broken control file? |
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) |
I was downloading a large 15GB file with Steinberg Download Assistant that is using Aria2. |
@MusoCity Have you tried to use the |
Yes, I got |
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? |
这链接怎么用来着,点进去就是一个选择文件的按钮,没了。 Ahh... It's work after close the Tampermonkey... |
An answer, which worked for me, on Stack Exchange is,
|
it is very strange that this issue is open from 2016 while there is a beautiful solution to resume downloads without the original link simply add this to aria2c command: this will save to uncompleted downloaded files to a file called |
@badrelmers will this remove the Or is there an additional step that won't be performed by a GUI downloader, eg uGet? |
when a download is successfully completed then aria will remove the link from session.txt automatically
i don t use uGet so i cannot comment, I use this one and it accept the session.txt file |
Also, I'm gonna try the session solution 4 next script. |
@badrelmers when using your command, I get:
So it seems there would need to be some scripting wrapping around this to check if the file exists, and only add the option if it does. Do you know if a session.txt is removed when the last download within it is complete? |
yes you have to create the session.txt file first, something like that will do the job: this will create an empty session.txt if it does not exist: if not exist session.txt type NUL > session.txt
no, the session.txt will not be deleted |
@Disonantemus I came up with the following which allows the script to be called from any directory: #!/bin/bash
# Resume a torrent from a .aria2 file
# Assumes download in same directory as the .aria2c file, overwrite with --dir=
# Credit: https://github.com/aria2/aria2/issues/792
url="magnet:?xt=urn:btih:$(xxd -p -seek 10 -l 20 "$1")"
cd "$(dirname "$1")" || exit 1
shift # Allow further aria2c command line options
exec aria2c "$url" "$@" This will not leave any lingering files like To easily update your trackers for fast fownloads, see here. |
What I do, I write the download link to a text file on my download folder within my bash script like this
|
This is my original cmd. aria2c.exe -j1 -x1 -i uris.txt --save-session failed.txt. The file uris.txt include the uris for the datasets that I want to download. The download was successful, but out of 4000 datasets around 300 failed and thus noted in the failed.txt file. I re-ran command aria2c.exe -j1 -x1 -i failed.txt --save-session failed2.txt but still the datasets failed to download. I assume that running aria2c.exe -j1 -x1 -i uris.txt --save-session failed.txt instead would start downloading the whole 4000 datasets. |
This is my original cmd. aria2c.exe -j1 -x1 -i uris.txt --save-session failed.txt. The file uris.txt include the uris for the datasets that I want to download. The download was successful, but out of 4000 datasets around 300 failed and thus noted in the failed.txt file. I re-ran command aria2c.exe -j1 -x1 -i failed.txt --save-session failed2.txt but still the datasets failed to download. I assume that running aria2c.exe -j1 -x1 -i uris.txt --save-session failed.txt instead would start downloading the whole 4000 datasets. |
Okay here is my solution to resume download: my aria2 config file (
In the event of failed or to resume downloads later, I just run aria2 with the input-file command supplied with the seesion file as below:
Explained in more details in the official documentation: |
Here you go: |
Hi everyone. I want to know how to do it in this case: I have 2 servers, and every server has its own aria2 downloader, we can call them as A and B. Now I want to move all A's tasks into B. In other words, how can I import the uncompleted tasks in aria2 ? I have tried to copy the downloading file and its own .aria file , copy both into B's downloads folder, and restart B. but there is no new tasks shown in B's list. But if I copy all A servers folders, includes the conf, downloads folders to a new server (not B server, but a new server), and restart aria service, the every tasks can shown in the list, nothing changed, just like A clone. So I want to confirm one thing, the If it should be like that. what should I do , if I just want to move only one uncompleted task from A to B ? how can I locate the mapping item in A's session file, and copy that line into B's session file ? Thanks in advance. |
Can I resume a download task use '.aria2' file ?
The text was updated successfully, but these errors were encountered: