Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Overclock.net Forum > FAQs

 
 
LinkBack Thread Tools
Old 08-29-06   #1 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,285

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Folding Team Rank: 614
Hardware Reviews: 9
Trader Rating: 1
Default How to: Automatically Backup Files

Being a computer enthusiast is both a blessing and a menace. We constantly change components and reap the performance benefits, but we're stuck with the time consuming tasks of backing up and recovering our important data in the new setup. After going through 6 reformats in the past 4 months, I've decided to take the effort out of the process. It's a bit more work to start, but afterwards, a simple click of a button (or scheduled task) can back up any and every file you wish.

Problems with manual backup:

- Because it's on a file-by-file basis, it's sometimes difficult to make sure you've included everything everytime
- It's difficult to remember where all the backed-up files were originally located (save game files in particular) when you go to restore them
- It's time consuming

The solution:

1) xcopy command
2) .BAT file
3) Windows task scheduler


xcopy Command

xcopy is a command-line function built into Windows that can be used to copy files/directories in a wide variety of ways. A full explanation can be read here.

For the purpose of this guide, I'll be doing seperate xcopy commands for each file/directory so that I can easily add/remove the backup of any given element. I am also using the /e parameter to include all empty directories, and the /y parameter to eliminate the "Overwrite files?" prompt.

Notes: When using xcopy, I've found it works best when you leave the \ off of your source and be sure you include the \ on your desination. This basically ensures you copy everything within the source directory, and ensures that your destination is a directory, not a file. You'll also want to surround all paths with " " to ensure the argument is read as a single string (if there are spaces in the path you must use quotes).


Code:
xcopy /e /y "C:\Source" "C:\Dest\"
This command will yield a directory in C:\ named Dest, and it will contain all files and subdirectories from Source.

For my backup method, I'll be copying to a different hard disk, but I'd like to keep the same path as the original. Why not just put it all in one folder? It's basically a preference thing. If I keep all the original paths intact, I just have to drag a single backup folder onto my freshly re-installed Windows. All the backed-up files will go back to their original places, with all directories and structures in place (very useful for saved game backups or custom configurations. It's a pain to locate all the save folders every time).

The model I use:

Code:
xcopy /e /y "C:\Program Files\Game1\Saves" "X:\Program Files\Game1\Saves\"
Even though I'll have two tiers of useless directories (Saves is the only one that's really needed) the other directories act as placeholders and keep the original filepath intact.


.bat File

A batch (.bat) file is a basically a list of commands to be executed. For this guide, I'll be using a batch file as a means to execute a series of xcopy commands that correspond to my different files. This is both the easiest and hardest part. Easiest because you just have to put repeated xcopy commands, hardest because any files you don't include in your batch file, won't get backed up. You have to be absolutely sure you include all important items in your list of xcopy commands.

Code:
xcopy /e /y "C:\Documents" "D:\Documents\"
xcopy /e /y "C:\Music" "D:\Music\"
xcopy /e /y "C:\Saves" "D:\Saves\"
After you have your full list of backup commands, save it under whatever name you'd like, but include a .bat extension. For simplicity, I used backup.bat.


Windows task scheduler



With the creation of your new backup batch file, you can use the Windows task scheduler to run a backup on a regular, scheduled basis. Here's how...

1) Control Panel -> Scheduled Tasks
2) Click "Add Scheduled Task"
3) Click "Next" and then "Browse" and find your backup batch file.
4) Set up the times that you want the task to run and you're finished.


Now, you'll have backups of anything you deem important, as often as you deem important. You can add and remove files at any time by simply editing your batch file. Hopefully someone can put it to good use, and save some headaches and lost work.

Restoration

After backing up all your files, you can easily make another file, restore.bat, with the source and destination drives reversed (ie. copying from D:\ to C:\). By running restore.bat file with a freshly formatted drive, you're able to put everything back in their original places. However, as mentioned before, I always backup to the exact same path as the original, so that all I have to do is drag the backed up files onto my C:\ and everything gets copied to the correct place.


Disclaimer:
As with all FAQ's, this is meant as a guide only. Myself and Overclock.net shall not be responsible for any undesired effects as a result of the procedures described in this guide.
__________________
System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"

Last edited by C-bro : 10-27-06 at 05:47 PM
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery  
Old 10-09-06   #2 (permalink)
WaterCooler
 
Akhen's Avatar
 
intel nvidia

Join Date: Mar 2006
Location: Fresno, CA
Posts: 1,739

Rep: 118 Akhen is acknowledged by manyAkhen is acknowledged by many
Unique Rep: 97
Folding Team Rank: 1399
Trader Rating: 16
Default

I am suprised no one has commented yet, this should serve me well thanks!
__________________
System: GE1201
CPU
C2D e6700
Motherboard
Asus Commando
Memory
G.Skill HZ's 4x1GB DDR2 800
Graphics Card
Gigabyte 7800GTX
Hard Drive
WD Caviar 200GB
Sound Card
Auzentech X-Fi Prelude
Power Supply
Silverstone Zeus ST65ZF
Case
CM Stacker
CPU cooling
Swiftech Apogee
GPU cooling
Danger Den NV-78
OS
Windows XP Pro| Ubuntu Studio
Monitor
Doublesight DS-263N 26"
Akhen is offline I fold for Overclock.net  
Old 10-09-06   #3 (permalink)
New to Overclock.net
 
nitecrawler's Avatar
 
amd ati

Join Date: Oct 2006
Posts: 9

Rep: 1 nitecrawler Unknown
Unique Rep: 1
Trader Rating: 0
Default

Good help is rarely shown gratitude!

Great info C-bro.......thanks!
__________________
PERCUSSIVE MAINTENANCE: The fine art of whacking the crap out of an electronic device to get it to work again.

System: My System
CPU
AMD Athlon 64 3000+
Motherboard
Asus A8V- deluxe
Memory
2 x 1g DDR400 (pc3200)
Graphics Card
ATI Radeon 9250 128mb
Hard Drive
seagate 320g SATA
Sound Card
on board 8 channel
Power Supply
cheapo 400w PSU
Case
usicase window
OS
Windows XP Pro SP2 64bit
Monitor
My trusty 17" CRT DV
nitecrawler is offline  
Old 10-27-06   #4 (permalink)
IDDQD
 
C-bro's Avatar
 
intel nvidia

Join Date: Jan 2006
Location: Windsor, ON
Posts: 2,285

Rep: 341 C-bro is a proven memberC-bro is a proven memberC-bro is a proven memberC-bro is a proven member
Unique Rep: 264
FAQs Submitted: 6
Folding Team Rank: 614
Hardware Reviews: 9
Trader Rating: 1
Default

Thanks for reading guys. Hopefully it helps you out. I added a bit more to it now.
__________________
System: RAID0R
CPU
Intel E2180 3.33GHz
Motherboard
Asus P5K-E/WIFI-AP vMod
Memory
2GB Kingmax DDR2-1066
Graphics Card
EVGA 8800GT
Hard Drive
2x250GB WD+500GB 7200.11
Sound Card
SB Audigy 2
Power Supply
Corsair VX550
Case
Lian Li PC-7B Plus II
CPU cooling
Arctic Cooling Freezer 7 Pro
GPU cooling
Zalman VF900-Cu
OS
Windows Vista Business
Monitor
Dell 2709W 27"
C-bro is offline I fold for Overclock.net Overclocked Account C-bro's Gallery  
 


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



All times are GMT -4. The time now is 04:35 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.10592 seconds with 8 queries