OZONE Asylum
FAQ
Quick and Easy Way to Backup Data
This page's ID:
5622
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "Quick and Easy Way to Backup Data"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
If you want a quick and easy way to back up data, here is a free solution to your problems: [i]Originally Posted by Perfect Thunder[/i] Try xcopy /? -- you'll find that this simple command line tool lets you do quite a bit. If all I wanted to do was back up only changed files, I'd use Windows Scheduler to run a batch file with an appropriate series of xcopy commands. [b]Silence also added a great method on setting this up[/b] [i]Originally Posted by [internallink=4931]silence[/internallink][/i] Ah, PT beat me to it. Seriously, an automated batch file is usually the best solution and it won't cost you a dime. Here's how it works. You create a text file and use the following as an example: quote: -------------------------------------------------------------------------------- CALL ..time_stamp.bat backup_log.txt ::::: Start Backup Task ::::: xcopy /e /y /d /i "c:*.*" "d:backup" CALL ..time_stamp.bat backup_log.txt ::::: End Backup Task ::::: -------------------------------------------------------------------------------- Now, change the extension on the text file from .txt to .bat and you will then be able to run it in windows. Now, lets break down the commands. The CALL function calls an external batch file called time_stamp.bat to put a time stamp in a file called backup_log.txt. This file will then contain a record of each time your backup process started and stopped. time_stamp.bat can be obtained from [url=http://www.fpschultze.de/b13.htm]here[/url]. The backup_log.txt file will then contain something like: 02/27/2003 1:28p ::::: Start Backup Task ::::: 02/27/2003 1:36p ::::: End Backup Task ::::: 02/27/2003 9:05p ::::: Start Backup Task ::::: 02/27/2003 9:11p ::::: End Backup Task ::::: The most important line of all contains the xcopy command. xcopy should be available on Windows 2000 and Windows XP. If you have 98 or ME then you'll have to use copy, which isn't as robust. ([small][internallink=4643]Tyberius Prime[/internallink]: I highly doubt that. I know that 95/98/Me have xcopy, and while it doesn't have all the parameters of the 2k or XP one, but it will usually do[/small]) The xcopy switches do the following: /e Copies directories and subdirectories, even empty ones. /y Suppresses prompting you to confirm overwriting a file. /d Copy only those files whose source time is newer than the destination time. /i If destination does not exist and copying more than one file, assumes that destination must be a directory. The *.* part is important as well since it tells xcopy to copy everything in that directory. Therefore, the following command: xcopy /e /y /d /i "c:*.*" "d:backup" Will copy everything from the root of the c-drive including files, directories, and subdirectories to a directory in the d-drive called "backup". If this directory does not exist, then xcopy will create the directory and all appropriate subdirectories. Also, if there are copies of these files in the d:backup folder already, xcopy will only copy the file if the date on the source file is newer than the date on the destination file. Now, to run this, simply set up a task (start->programs->accessories->system tools->scheduled tasks) that runs every night at say, 11:55pm and point that task to your batch file. If you want more information on your backups, create another batch file with the following line: backup.bat > file_log.txt Then, point your task to this file. It will run the backup.bat (assuming that was the original file you created) file and pipe all output to file_log.txt. Now, file_log.txt should have a record of all files copied. One thing to note is that there is no open file support for xcopy, so if it tries to copy over a file you have open (say you still have a .psd open in photoshop) it won't copy that file over and it will return an error. With the /c switch, however, you can tell xcopy to continue copying the other files and skip the one that returned the error. Hope that helped. [small][i](Added by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=CPrompt]CPrompt [/url] on Thu 27-Mar-2003)[/i][/small] For more information on xcopy switches, just look under "xcopy" in Windows Help. For a little more expanded information, check out the following link: [url=http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true]Windows XP Documentation : xcopy[/url] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Wes]Wes [/url] on Thu 27-Mar-2003)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Tyberius+Prime]Tyberius Prime [/url] on Fri 28-Mar-2003)[/i][/small] [small](Edited by [url=http://www.ozoneasylum.com/user/1079]CPrompt[/url] on 12-26-2007 19:48)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »