AOA AOA AOA Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA > Software > Programming and Assembly Language

Programming and Assembly Language Please read this Topic's rules!!

Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 16th March, 2009, 08:33 PM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,241
Send a message via MSN to Rondog

Backup from batch file - please critique

Can someone please give me some feedback on my backup batch file?

Cheers

Code:
@ECHO off
cd\
g:
md email
echo.
md database
echo.
md documents
echo.
md "neis important docs"
echo.
md desktop
echo.
xcopy "c:\documents and settings\owner\local settings\application data\microsoft\outlook\*.*" g:\email
echo.
xcopy "C:\Documents and Settings\Owner\My Documents\*.mdb" g:\database
echo.
xcopy "C:\Documents and settings\owner\my documents\*.doc" g:\documents
echo.
xcopy "C:\Documents and settings\owner\my documents\*.docx" g:\documents
echo.
xcopy "C:\Documents and settings\owner\my documents\*.pdf" g:\documents
echo.
xcopy "C:\Documents and settings\owner\my documents\*.xls" g:\documents
echo.
xcopy "C:\Documents and settings\owner\my documents\*.rtf" g:\documents
echo.
xcopy "C:\Documents and Settings\Owner\My Documents\Neis Important Docs" "g:\neis important docs" /s /i
echo.
xcopy "E:\Documents and Settings\Amelia Dohnt\My Documents\Converted ABDCData.mdb" g:\database
echo.
xcopy "C:\Documents and Settings\Owner\Desktop" g:\desktop /s /i
echo.
pause
__________________
AOA Team fah AOA Team files

Rig 1: Intel C2Q Q8200 @ 3ghz, GA-EP45-UD3R, 4gb, 8600GT, 2x1tb, Vista64
Rig 2: Athlon AM2 6000,4gb,9800GT,320gb SATA2,XP Pro SP3
Rig 3: Toshiba-Centrino Duo 2.16ghz,4gb,7600GT,128gb SSD, Windows Vista 64bit
Rig 4: Sony Vaio,2ghz,4gb,200gb,X3100,Vista Home Premium
Rig 5: Athlon XP 2400+,2gb,80gb,GF4Ti4200,XP MCE
Rig 6: Athlon XP 2700+,2gb,2x250gb,2x1.5tb,Server 03
Rig 7: Sempron 3500+, 1.5gb, 80gb, 8400GS, XP MCE
Rig 8: 2x Dell Power Edge R710, 2x Dell Power Edge R300
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 17th March, 2009, 11:35 AM
Áedán's Avatar
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 12,248

You need to give some more information - what's the scenarios you will be using this? How does the restore work? What kind of file/files are you intending to back up.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18th March, 2009, 03:07 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,241
Send a message via MSN to Rondog

Its just going to be used to backup one PC to a portable USB hard drive. It is only temporary and only needs to last until June. Backup includes 1 PST file, numerous .doc and .docx and thats about it. All it is for, if the PC goes down, work can continue from another location.
__________________
AOA Team fah AOA Team files

Rig 1: Intel C2Q Q8200 @ 3ghz, GA-EP45-UD3R, 4gb, 8600GT, 2x1tb, Vista64
Rig 2: Athlon AM2 6000,4gb,9800GT,320gb SATA2,XP Pro SP3
Rig 3: Toshiba-Centrino Duo 2.16ghz,4gb,7600GT,128gb SSD, Windows Vista 64bit
Rig 4: Sony Vaio,2ghz,4gb,200gb,X3100,Vista Home Premium
Rig 5: Athlon XP 2400+,2gb,80gb,GF4Ti4200,XP MCE
Rig 6: Athlon XP 2700+,2gb,2x250gb,2x1.5tb,Server 03
Rig 7: Sempron 3500+, 1.5gb, 80gb, 8400GS, XP MCE
Rig 8: 2x Dell Power Edge R710, 2x Dell Power Edge R300
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 18th March, 2009, 08:12 AM
Áedán's Avatar
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 12,248

I just wondered why you didn't copy the whole of the \documents and settings\userid\ across?
Tools like Rsync can do a compare then copy, so that they only copy files that have changed. This helps speed things up.

How do you intend to restore the data if the system dies? Have you tested the plan?
__________________

Last edited by Áedán; 18th March, 2009 at 08:12 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 18th March, 2009, 08:24 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,241
Send a message via MSN to Rondog

Yes its been tested. Systems are very similar, it can be just copied back as easily. Reason for not copying entire user ID is size limits. The client is on a government contract which ends in June and they are unsure at this stage if it will be renewed. If it gets renewed, they will be purchasing a server with tape back up. So it is only required to backup mission critical data until then.
__________________
AOA Team fah AOA Team files

Rig 1: Intel C2Q Q8200 @ 3ghz, GA-EP45-UD3R, 4gb, 8600GT, 2x1tb, Vista64
Rig 2: Athlon AM2 6000,4gb,9800GT,320gb SATA2,XP Pro SP3
Rig 3: Toshiba-Centrino Duo 2.16ghz,4gb,7600GT,128gb SSD, Windows Vista 64bit
Rig 4: Sony Vaio,2ghz,4gb,200gb,X3100,Vista Home Premium
Rig 5: Athlon XP 2400+,2gb,80gb,GF4Ti4200,XP MCE
Rig 6: Athlon XP 2700+,2gb,2x250gb,2x1.5tb,Server 03
Rig 7: Sempron 3500+, 1.5gb, 80gb, 8400GS, XP MCE
Rig 8: 2x Dell Power Edge R710, 2x Dell Power Edge R300
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 18th March, 2009, 09:03 PM
danrok's Avatar
AOA Front Page Managing Editor in Chief
 
Join Date: March 2003
Location: Great Britain
Posts: 16,702

It might be worth adding some error handling.

Also, a message and pause, at the start, telling them to ensure the USB drive is connected.
__________________
AOA Team fah
I am folding with an AMD A64, Intel Atom, nvidia GPU, & PS3 Cell Processor. Join AOA's team today!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 19th March, 2009, 12:22 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,241
Send a message via MSN to Rondog

Ahah, good idea thanks danrok!

However, I do not understand what you mean by error handling?
__________________
AOA Team fah AOA Team files

Rig 1: Intel C2Q Q8200 @ 3ghz, GA-EP45-UD3R, 4gb, 8600GT, 2x1tb, Vista64
Rig 2: Athlon AM2 6000,4gb,9800GT,320gb SATA2,XP Pro SP3
Rig 3: Toshiba-Centrino Duo 2.16ghz,4gb,7600GT,128gb SSD, Windows Vista 64bit
Rig 4: Sony Vaio,2ghz,4gb,200gb,X3100,Vista Home Premium
Rig 5: Athlon XP 2400+,2gb,80gb,GF4Ti4200,XP MCE
Rig 6: Athlon XP 2700+,2gb,2x250gb,2x1.5tb,Server 03
Rig 7: Sempron 3500+, 1.5gb, 80gb, 8400GS, XP MCE
Rig 8: 2x Dell Power Edge R710, 2x Dell Power Edge R300
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 30th March, 2009, 05:25 PM
danrok's Avatar
AOA Front Page Managing Editor in Chief
 
Join Date: March 2003
Location: Great Britain
Posts: 16,702

You can use the IF ERRORLEVEL command, to handle errors.

DOS commands will set ERRORLEVEL depending on what happened when they were executed.
__________________
AOA Team fah
I am folding with an AMD A64, Intel Atom, nvidia GPU, & PS3 Cell Processor. Join AOA's team today!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
batch file , programming



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New PS3 Owners Discover Noisy, Defective Console Batch Samuknow General Hardware Discussion 0 12th April, 2007 07:15 AM
Good tool for batch processing of images? danrok Digital Image, Photo, Video and Audio Editing. 6 30th May, 2004 10:07 PM
Using % in batch files Áedán Programming and Assembly Language 1 18th August, 2002 08:20 AM


All times are GMT -5. The time now is 12:59 AM.


Copyright ©2001 - 2009, AOA Forums

Search Engine Friendly URLs by vBSEO 3.3.0