rd Posted December 5, 2010 Report Share Posted December 5, 2010 A brief power outage caused 2.0.4 to lose all torrents. It looks like resume.dat is bad.I suggest that this file is not left open. And instead of writing directly to it, write to a another file and then rename the new and old files.I need to set the current directory for hundreds of torrents now. A batch find & set feature would be nice right now. Link to comment Share on other sites More sharing options...
Ultima Posted December 5, 2010 Report Share Posted December 5, 2010 µTorrent already does attempt to do that. That's exactly what resume.dat.old is for. Windows caches the writes apparently, which screws this up. Anyway, this is a known issue, and AFAIK there are already plans to improve this. Link to comment Share on other sites More sharing options...
rd Posted December 5, 2010 Author Report Share Posted December 5, 2010 µTorrent already does attempt to do that. That's exactly what resume.dat.old is for. Windows caches the writes apparently, which screws this up...In Windows you can close the file or force the write. On Linux, you're SOL as the kernel lies about forced writes.FWIW, the old file was timestamped the same as the current file. So I'm guessing uTorrent on startup happily overwrote the old file. Link to comment Share on other sites More sharing options...
ustars Posted December 5, 2010 Report Share Posted December 5, 2010 I have same problem with loosing files after failure. Unfortunately it seems Win XP disk cache problem.After saving file disk cache writes only part of file (file has still old size) and waits long time to write it completely.When file is saved you have failure before disk cache writes it completely then you have data loss.Its WinXP cache problem that waits even a few minutes (too long in my opinion) to write a file.Win98 cache seems to be better in this as I didn't have so much data loss when failure.I know that in XP it's possible to turn off write cache to reduce damage:System properties>Hardware>Device manager>disks>get properties of your disk>Rules>uncheck write bufferText on your system might be slightly differ as I translate it from my language to english.Unfortunately when write buffer is turned off then I can see write speed on my HDD is loweredfrom ~24MB/s to ~8MB/s so is consideration speed vs data integrity.uTorrent writes RESUME.DAT every minute so RESUME.DAT.OLD is 2 minutes old.Thing you can do is make more backup copies so if newest is not yet written you still have older.Simple BACKUP.BAT code to make 6 backup copies would look like this:- yesterday I posted it, but this one is corrected with additional check for RESUME.DAT existenceso backup is not overwritten when it does not exist:@ECHO OFFECHO This .BAT file should be run in uTorrent settings directory:ECHO %AppData%\uTorrentIF NOT EXIST RESUME.DAT GOTO FAILIF EXIST RESUME_5.DAT COPY RESUME_5.DAT RESUME_6.DATIF EXIST RESUME_4.DAT COPY RESUME_4.DAT RESUME_5.DATIF EXIST RESUME_3.DAT COPY RESUME_3.DAT RESUME_4.DATIF EXIST RESUME_2.DAT COPY RESUME_2.DAT RESUME_3.DATIF EXIST RESUME_1.DAT COPY RESUME_1.DAT RESUME_2.DATIF EXIST RESUME.DAT COPY RESUME.DAT RESUME_1.DATGOTO END:FAILECHO RESUME.DAT does not exist - backup skipped.PAUSE:ENDREM CLS to make DOS window close automaticallyCLSJust use task scheduler to run it minimized in background for example every minute or 2.Or BACKUP2.BAT using rename - less disk writes (also corrected):@ECHO OFFECHO This .BAT file should be run in uTorrent settings directory:ECHO %AppData%\uTorrentIF NOT EXIST RESUME.DAT GOTO FAILIF EXIST RESUME_6.DAT REN RESUME_6.DAT RESUME_7.DATIF EXIST RESUME_5.DAT REN RESUME_5.DAT RESUME_6.DATIF EXIST RESUME_4.DAT REN RESUME_4.DAT RESUME_5.DATIF EXIST RESUME_3.DAT REN RESUME_3.DAT RESUME_4.DATIF EXIST RESUME_2.DAT REN RESUME_2.DAT RESUME_3.DATIF EXIST RESUME_1.DAT REN RESUME_1.DAT RESUME_2.DATIF EXIST RESUME_7.DAT REN RESUME_7.DAT RESUME_1.DATIF EXIST RESUME.DAT COPY RESUME.DAT RESUME_1.DATGOTO END:FAILECHO.ECHO RESUME.DAT does not exist - backup skipped.PAUSE:ENDREM CLS to make DOS window close automaticallyCLS Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.