[Libtorrent-devel] recovering files
josef at ttdpatch.net
Mon Apr 21 16:33:10 UTC 2008
On Apr 21, 2008, at 6:21 PM, RB Boehm wrote:
> I hope that this is a simple question.
> Am running rtorrent 0.7.9 on Ubuntu 7.07. Have been for about a year
> after switching from azurus.
> I accidentally deleted some files that I downloaded. As I was (and
> still am) seeding the files they still exist intact and their
> are known by rtorrent, at least until I close the torrent. Is it
> possible to get the files back?
> Have considered a couple of solutions:
> 1) stop the torrent with ctrl-d and use ctrl-O to change the
> Am concerned that if the torrent is stopped that the files will
> be lost.
Don't do that!
As soon as rtorrent closes the filehandle, the file is lost (unless
you shut down the system and use some filesystem-specific recovery
So don't do anything that causes rtorrent to close the files. This
includes stopping/closing the download, or starting another download
that requires more files to be opened, closing the old ones, or
running out of diskspace or reaching the upload ratio (if you have
> 2) find out where rtorrent stores the information on file names,
> etc and
> use the information to copy the files while rtorrent continues
> to seed them.
Currently, the file only exists as dangling inode and will disappear
when rtorrent closes its filehandle to it. However it is impossible
to open a file by inode. There may be tools to recreate a directory
entry if you can find out the inode, depending on the filesystem. But
this probably requires to unmount the filesystem first, hence
shutting down all applications including rtorrent. For this approach
you will have to ask someone who knows more about your filesystem,
it's not related to rtorrent.
> I expect that the question has been asked before but am uncertain
> as to
> how to find the relevent thread(s) in the archives. I hope that the
> is available and simple.
I think the easiest, and probably fastest solution would be to start
another copy of rtorrent on your local system and download the file
from your main rtorrent. Set the main rtorrent to ignore ratios first
(shift-I), to prevent it from closing the download when reaching the
ratio. Then just download the file from yourself; turn off the
bandwidth limit to make this work at the full LAN speed.
That should work, I think.
josef at ttdpatch.net
More information about the Libtorrent-devel