Overclockers Australia Forums
OCAU News - Wiki - PC Database - QuickLinks - Job Search - Pix - Sponsors  

Go Back   Overclockers Australia Forums > OCAU Community > Team OCAU - Distributed Computing


Sign up for a free OCAU account and this ad will go away!
Reply
 
Thread Tools
Old 10th March 2005, 10:25 PM   #1
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default Never lose partially completed work again. Useful small folding back-up tool

If you have experienced a thunderstorm induced spike that gives a folding checksum error and causes the client to restart at 0; or a power outtage to the same effect; or if you have lost work by an early unit end or other error because of a too aggressive overclock, etc, wouldn't it be nice to be able to restore the wu to its last good checkpoint?

The following dos batch file saves in real time the contents of 2 clients (2 instances hyperthreading) at 8 previous points.

Quote:
rem echo off
cls

echo The FAH Backup System v1.2b
echo By BorisBorf (Cole Montgomery)
echo CBD Folding (#36974)
echo http://cole.montgomery.spymac.net/fah/
echo Configure to your liking!
echo A hint: Use Notepad's Edit->Replace feature! Ctrl+H

cd "C:\Program Files"

rd "C:\Program Files\FAHBACK\8" /s /q


ren "C:\Program Files\FAHBACK\7" 8
ren "C:\Program Files\FAHBACK\6" 7
ren "C:\Program Files\FAHBACK\5" 6
ren "C:\Program Files\FAHBACK\4" 5
ren "C:\Program Files\FAHBACK\3" 4
ren "C:\Program Files\FAHBACK\2" 3
ren "C:\Program Files\FAHBACK\1" 2

xcopy "C:\Program Files\Folding@Home\*.*" /e "C:\Program Files\FAHBACK\1\FAH\*.*"
xcopy "C:\Program Files\Folding@Home2\*.*" /e "C:\Program Files\FAHBACK\1\FAH2\*.*"


cls
exit
I call it FAHback.bat

The routine was originally written by a bloke nicknamed BorisBorf and posted at the folding community forum.

Once set up as a working batch file, use the windows task scheduler to run it every hour, 1/2 hour or whatever else you choose.

I have scheduled i to run at every 1/2 hour.

The routine copies the client folders specified in the xcopy lines to C:\Program Files\FAHBACK\1...\2...\3...etc such that \1 contains a copy of each of two folders at the last backup time, \2 30 min earlier, etc.

Initially I was concerned that the routine itself mught induce a checksum error into the backed up folders, but so far my testing does not indicate any problem.

Feel free to use it, modify it or ignore it.

All my clients are set to ask before connecting to the network, so that an early unit end wu is not just automatically sent, giving me the opportunity to restore that unit. If I suspect that the problem was caused by a too agressive o/c, I step back the overclock, restore the wu, and finish normally, sometimes saving 70, 80, 90% of completed work.

I'll happily answer any question that I can.

It works.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood

Last edited by ezee; 10th March 2005 at 10:49 PM.
ezee is offline   Reply With Quote
Old 12th March 2005, 6:25 PM   #2
xms3500
Member
 
xms3500's Avatar
 
Join Date: Apr 2003
Location: Swan Hill Vic
Posts: 578
Default

Quote:
Originally Posted by ezee
If you have experienced a thunderstorm induced spike that gives a folding checksum error and causes the client to restart at 0; or a power outtage to the same effect; or if you have lost work by an early unit end or other error because of a too aggressive overclock, etc, wouldn't it be nice to be able to restore the wu to its last good checkpoint?

The following dos batch file saves in real time the contents of 2 clients (2 instances hyperthreading) at 8 previous points.



I call it FAHback.bat

The routine was originally written by a bloke nicknamed BorisBorf and posted at the folding community forum.

Once set up as a working batch file, use the windows task scheduler to run it every hour, 1/2 hour or whatever else you choose.

I have scheduled i to run at every 1/2 hour.

The routine copies the client folders specified in the xcopy lines to C:\Program Files\FAHBACK\1...\2...\3...etc such that \1 contains a copy of each of two folders at the last backup time, \2 30 min earlier, etc.

Initially I was concerned that the routine itself mught induce a checksum error into the backed up folders, but so far my testing does not indicate any problem.

Feel free to use it, modify it or ignore it.

All my clients are set to ask before connecting to the network, so that an early unit end wu is not just automatically sent, giving me the opportunity to restore that unit. If I suspect that the problem was caused by a too agressive o/c, I step back the overclock, restore the wu, and finish normally, sometimes saving 70, 80, 90% of completed work.

I'll happily answer any question that I can.

It works.

ezee if my F@H client is in:C:\F@H1 should I change your the xcopy line to refelect where my client is

I don't have a CLUE on anything DOS but will work it out,with some help.

Also i know that you have to open a command prompt to type all the stuff in,but how do you save it when you get to the end of the script,so that it is right. ,and will work.
__________________
Folding@Home 80000 Points Milestone

Successful Trades: Minidisc,Felony,2QIK4U,Coolmatt,pyr0x,Cathar,MnM,C hoppa,necrodon,balckjok3r,Lombers,branko,the _rick,SH2004,Harbx,Globe,tagrobert,bob(nz),ViperAM D,booj,kr0k,
petal666,hourpung,Loop Goose,dark_dragon100,atmo,slyls1,Syvirus
xms3500 is offline   Reply With Quote
Old 12th March 2005, 11:33 PM   #3
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Quote:
Originally Posted by xms3500
ezee if my F@H client is in:C:\F@H1 should I change your the xcopy line to refelect where my client is

I don't have a CLUE on anything DOS but will work it out,with some help.

Also i know that you have to open a command prompt to type all the stuff in,but how do you save it when you get to the end of the script,so that it is right. ,and will work.
I didn't write the script, but I modified one written by Cole Montgomery to fit into my existing file structures.

All my folding files are in C: \Progam Files

This routine creates a new Folder, FAHBack, also within Program Files with a set of subfolders, 1,2,3,4,5,6,7and 8 . C:\Program Files\FAHBACK\1 contains a copy of the folder containing each of my active folding clients. C:\Program Files\FAHBACK\2 contains each folding client folder as at 1/2 hour prior to C:\Program Files\FAHBACK\1.

Modify it to suit where you wish the files to be located.

After the echo commands, the commands are very simple.

cd = change directory.

rd= remove directory.

ren = renumber

If you wish the FAHBack directory along with your folding clients to be in C: and not in C:\Program Files , then delete all references to Program Files\.

Use notepad to edit the script.

Short answer to your question is yes.

Believe me, I also have little recent experience with DOS and had to stretch my memory back to pre-windows and pre mouse days.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood
ezee is offline   Reply With Quote
Old 12th March 2005, 11:50 PM   #4
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Additional notes.

If you do not have your clients set to ask before sending back wu's or receiving new work units, this routine will be useless. It does you no good to restore a wu that has already been returned to Stanford.

This routine only gives me 8 supplementary backup points (4 hours when run every 1/2 hour) Cole's original was set to make 48 back-up points. Add more by adding another ren line and increasing the rd operator by 1.

You may need more if you don't notice a problem wu within the maximum backup cycle. ie, for me, the current folding folder will be copied every 1/2 hour so that if I don't notice if for more than 4 hours, every supplememtary backup point will be a copy of the wu in its problem state.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood
ezee is offline   Reply With Quote
Old 13th March 2005, 3:16 PM   #5
brettmo86
Member
 
brettmo86's Avatar
 
Join Date: Jul 2004
Location: Gold Coast
Posts: 1,150
Default

awesome.
brettmo86 is offline   Reply With Quote
Old 13th March 2005, 5:27 PM   #6
petercr
Member
 
petercr's Avatar
 
Join Date: Jan 2002
Location: Northern Brisvegas (4037)
Posts: 3,242
Default

Quote:
Originally Posted by ezee
I
ren = renumber
actually it's short for RENAME

RD also = REMDIR
CH also = CHDIR

Reading the file below, it looks like he's got it arse-about - he's renaming a directory that doesn't exist then copies files to it. It seems you'd need to
first create a backup directory or move the xcopy commands before the rename commands...
__________________
Proud to be part of the OCAU FOLDING Team
Folding@Home 150K Club Member
Folding@Home 8,000,000 Point Milestone

OCAU Hall of Fame member
I think if we were doing Bio-terrorism@Home, it wouldn't be that popular - Vijay S Pande

Last edited by petercr; 13th March 2005 at 8:06 PM.
petercr is offline   Reply With Quote
Old 13th March 2005, 5:30 PM   #7
xms3500
Member
 
xms3500's Avatar
 
Join Date: Apr 2003
Location: Swan Hill Vic
Posts: 578
Default

Quote:
Originally Posted by petercr
actually it's short for RENAME

RD also = REMDIR
CH also = CHDIR

Reading the file below, it looks like he's got it arse-about - he's renaming a directory that doesn't exist then copies files to it. It seems you'd need
first backup directory or move the xcopy commands before the rename commands...
As i know nothing about DOS,how would you make the bat file petercr,what would the file look like if you did it PLEASE.
__________________
Folding@Home 80000 Points Milestone

Successful Trades: Minidisc,Felony,2QIK4U,Coolmatt,pyr0x,Cathar,MnM,C hoppa,necrodon,balckjok3r,Lombers,branko,the _rick,SH2004,Harbx,Globe,tagrobert,bob(nz),ViperAM D,booj,kr0k,
petal666,hourpung,Loop Goose,dark_dragon100,atmo,slyls1,Syvirus
xms3500 is offline   Reply With Quote
Old 13th March 2005, 5:59 PM   #8
petercr
Member
 
petercr's Avatar
 
Join Date: Jan 2002
Location: Northern Brisvegas (4037)
Posts: 3,242
Default

Pretty much like I said...

rem echo off
cls

echo The FAH Backup System v1.2b
echo By BorisBorf (Cole Montgomery)
echo CBD Folding (#36974)
echo http://cole.montgomery.spymac.net/fah/
echo Configure to your liking!
echo A hint: Use Notepad's Edit->Replace feature! Ctrl+H

cd "C:\Program Files"

rd "C:\Program Files\FAHBACK\8" /s /q

xcopy "C:\Program Files\Folding@Home\*.*" /e "C:\Program Files\FAHBACK\1\FAH\*.*"
xcopy "C:\Program Files\Folding@Home2\*.*" /e "C:\Program Files\FAHBACK\1\FAH2\*.*"

ren "C:\Program Files\FAHBACK\7" 8
ren "C:\Program Files\FAHBACK\6" 7
ren "C:\Program Files\FAHBACK\5" 6
ren "C:\Program Files\FAHBACK\4" 5
ren "C:\Program Files\FAHBACK\3" 4
ren "C:\Program Files\FAHBACK\2" 3
ren "C:\Program Files\FAHBACK\1" 2


cls
exit


Here's what it does (apart from echoing messages and clearing the screen)...
changes to the Program Files directory then deletes the 8th backup directory. Xcopy allows you to copy to a directory and create a new one at the same time (if it doesn't exist), you're doing this twice if you run hyperthreading. It then incrementally renames the backup directories so that '1' is the freshest.

EDIT: if you're not using HT then skip the second xcopy command and you can have up to 8 backups...
__________________
Proud to be part of the OCAU FOLDING Team
Folding@Home 150K Club Member
Folding@Home 8,000,000 Point Milestone

OCAU Hall of Fame member
I think if we were doing Bio-terrorism@Home, it wouldn't be that popular - Vijay S Pande

Last edited by petercr; 13th March 2005 at 8:07 PM. Reason: fixed grammatical errors
petercr is offline   Reply With Quote
Old 13th March 2005, 7:59 PM   #9
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Well Peter,

You are almost correct.

Relocating the xcopy commands as you suggest will not give 8 back-up points, but will give 7 with a copy \2 thru \8.

Each iteration creates a \1 folder and the proceeds to remane it as \2. Your latest backup will end in \2.

If you want to have 8 with the latest in \1, then move the xcopy commands back to their original location.

As originally drafted the first run will produce only a \1 folder, the 8th run and later will fill \1 thru \8.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood

Last edited by ezee; 13th March 2005 at 8:05 PM.
ezee is offline   Reply With Quote
Old 13th March 2005, 8:05 PM   #10
petercr
Member
 
petercr's Avatar
 
Join Date: Jan 2002
Location: Northern Brisvegas (4037)
Posts: 3,242
Default

But the first (the xcopy) is actually a copy of your active data so technically that's 8... (there's 7 renames).
__________________
Proud to be part of the OCAU FOLDING Team
Folding@Home 150K Club Member
Folding@Home 8,000,000 Point Milestone

OCAU Hall of Fame member
I think if we were doing Bio-terrorism@Home, it wouldn't be that popular - Vijay S Pande
petercr is offline   Reply With Quote
Old 13th March 2005, 8:15 PM   #11
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Ohhh, and what exact is in \1 after you rename it \2?

7 backup points \2 thru \8, technically 7.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood
ezee is offline   Reply With Quote
Old 13th March 2005, 11:03 PM   #12
SteveMenheere
Member
 
SteveMenheere's Avatar
 
Join Date: Sep 2004
Location: Geelong
Posts: 214
Default

I don't use DOS as much as I used to but it looks to me that ezee has 8 directories with backups & petercr has 7.

..
In the interest of accuracy, I just tried both formats and the one with the xcopy command at the end (ezee's) is correct and leaves directories from 1 to 8,
the other (petercr's) leaves directories 2 to 8

Either will give you a decent margin of error though, if you are at your computer regularly enough to catch an error or allow it to send a WU without losing too much time.
__________________
4,000,000 Points Milestone | Addicted to folding club member #63 | Folding as vicbt
SteveMenheere is offline   Reply With Quote
Old 14th March 2005, 12:34 PM   #13
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Quote:
Originally Posted by SteveMenheere
Either will give you a decent margin of error though, if you are at your computer regularly enough to catch an error or allow it to send a WU without losing too much time.
If not at your computer regularly enough, it is easy to add additional checkpoints. I think I said in an earlier post that the author of the original routine wants 48 supplementary checkpoints on his boxen. The danger with that is the size of the FAHBack folder, particularly if backing up 2 "large" units at a go.

I salvaged 85% of a 122 pt dgromac last night (it suffered a checkpoint error when I had what must have been a brownout.) I reckon this will save me 100-500 points per week, based on earlier difficulties.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood
ezee is offline   Reply With Quote
Old 15th March 2005, 10:25 AM   #14
ezee Thread Starter
Member
 
ezee's Avatar
 
Join Date: Nov 2003
Location: Clareville NSW
Posts: 1,403
Default

Tip: Scheduled tasks in Win XP will not run unless you have a login password set and repeat your password in the new scheduled task properties.
__________________
GrumpyOldMen, OCAU Addicted to Folding Club, Member #69

Remember the Battle of Brisbane!
I'm just a soul whose intentions are good.
O Lord! Please don't let me be misunderstood
ezee is offline   Reply With Quote
Old 17th March 2005, 2:27 PM   #15
Volumex
Member
 
Volumex's Avatar
 
Join Date: Oct 2003
Location: Birkdale
Posts: 354
Default

I guess this would be good for a situation like this...

Quote:
[03:24:45] Protein: p1141_RIBO_FSpeptide_HEL_nospring
[03:24:45]
[03:24:45] Writing local files
[03:24:46] Completed 249390 out of 250000 steps (100)
[03:24:58] Extra SSE boost OK.
[03:39:48]
[03:39:48] Folding@home Core Shutdown: UNKNOWN_ERROR
[03:39:52] CoreStatus = 77 (119)
[03:39:52] Client-core communications error: ERROR 0x77
[03:39:52] Deleting current work unit & continuing...
__________________
Folding for Team_Bris
Succesful trades: DTG, davo_rulz, syxx, Soulblade, MrShadow, fry, doogs2590, B£å¢kÐðg, psylink (x2), dukkie, 1234, VinnY, Retribution, Suicidal ,petercr, Spizz, Tasty_Vito, Rickster, Grafton26, ReLiK_7, 5days, Pseudo, Wilso, Betzie, bob(nz), barney, BurntToast, freaky_beeky, reags, Alba , GTZLevin
Volumex is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 12:23 AM.


eXTReMe Tracker
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. - This page served to you by: surf
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Internode!