View Full Version : Automatically backing up files across hdd's
BonedAgain
01-13-2003, 03:02 PM
MY pc has 2 hdd's, the main/largest/newest one runs win2k, the other/original runs me. I have a handfull of files I would like to automatically backup from the main hdd to the other one at some specified interval, say on power down, or perhaps then and also every 6 hours (since I often leave the pc onb for days at a time). I don't need anything real fancy/complicated/hard to use (like Norton ghost), I don't want to create a complete image of the one drive onto the other, I just want to automatically backup these few important files. Tried writing a .bat file, screwed with it for days, nogo. How might I do this seemingly straightforward task?
TIA
BA
Budfred
01-13-2003, 03:28 PM
I suspect any number of backup programs would do what you want. Here are some links at PCWorld for programs:
http://www.pcworld.com/downloads/file_description/0,fid,22464,00.asp
Budfred
gwallen4
01-13-2003, 04:38 PM
Example of .bat file:
xcopy32 c:\MyDocuments\*.* d:\MyDocumentsBkup\
xcopy32 c:\MyMusic\*.* /s d:\MyMusicBkup\
exit
This will copy all the files from c:\MyDocuments to a backup directory on d:. Then it will copy all the files from C:\MyMusic (including files in subdirectories (signified by '/s')) to d:.
Note that there must be no spaces in the directory names so rename any directories like that. 'Exit' at the end will return you to windows automatically.
Write the program in notepad and save it to whatever directory you want using the extension .bat.
Use Task Schedular to run the program at the desired time.
Vic 970
01-13-2003, 04:52 PM
That looks good, but how will it store the bkps.?
eg: if you set it to run every week, will it overwrite the previous one, or label them in some way ? ie: My Docs 1: My Docs 2 etc.
gwallen4
01-13-2003, 05:23 PM
Yep, it will overwrite the old backup. After the backup is completed you can rename the backup directory. Actually if you are smart enough you could probably add the date of the backup to the directory name in the bat file.
I use .bat files to periodically backup files to another computer on my network in case my harddrive gets blitzed.
But then I also backup to CD-R and store the CD-R in another facility. It's fairly easy in Nero to do this, and you can save the format of the burn and retrieve it the next time you backup.
Paul Komski
01-13-2003, 06:47 PM
FYI: Win2K has a native backup program, which you can use to create a backup job that will do incremental backups.
PS THIS BackupMyPC (http://downloads-zdnet.com.com/3000-2242-10067915.html) might also work for you.
BonedAgain
01-14-2003, 12:10 AM
Thanks for the replies. I've looked at a number of utilities which are used for backing up, the ones I've actually tried seem to only be able to back up onto removable media, rather than another hdd (I'll look at the ones mentioned here though). I don't recall the exact text of the .bat I futzed with, looks pretty similar to the code suggested by Gwallen. Maybe it didn't work because my directory paths *DID* contain spaces. One file I want to back up is my Mozilla bookmarks file, whose location is "D:\Documents and Settings\Roland P. Horneboste\Application Data\Mozilla\Profiles\default\kg98bcrl.slt". Since quite a few apps have files off portions of this address, I'm afraid eliminating all the spaces would wreak more havoc than it's worth (I've always thought the process of moving the various configuration & data files away from the app's location, and even grouping program files in one directory, caused uneeded complexity/confusion rather than eliminating it ;-( Why do the spaces need to be eliminated? Seems like there'd be a way to accomodate this.
Thanks again all,
BA
gwallen4
01-14-2003, 02:39 PM
To xcopy files from directories with long names do the following. In Win95/98/ME? file/directory names are saved with both the long file name and a short (8.3) file name.
To determine the short name, remove any spaces, use the first six characters and add a tilde (~) and a number.
So 'My Documents' becomes 'MyDocu~1'.
xcopy32 c:\MyDocu~1\*.* /s d:\MyDocumentsBkup\
exit
BonedAgain
01-14-2003, 03:44 PM
Gwallen-So in other words I don't actually have to RENAME the directories, just use the path as you described in the commands? BTW I'll be copying in win2k, if this makes any difference.
Thanks!
BA
gwallen4
01-14-2003, 04:28 PM
That's correct. You don't need to rename the source directory, just use its short name when referring to it in the xcopy32 command.
I haven't used Win2k so all you can do is try it. I know it works in Win98.
sleddog
01-14-2003, 07:31 PM
Instead of struggling with xcopy, use FSync (http://www.vicobiscotti.it/eng/fsync.htm - 31kb download) in your batch file.
FSyn will backup from one directory (A) to another directory (B). It's essentially a one-way syncronization:
- If a file is added or modified in directory A it will be backed up to directory B.
- If a file is removed from directory A it will be removed from directory B.
- Delete a file in Directory B and a fresh copy will be backed-up (in other words, the file is not deleted from directory A).
Use in a batch file:
REM Backup my html work:
fsync C:\www F:\www /F
REM Backup my Mozilla Profile:
fsync "%UserProfile%\Application Data\Mozilla" F:\Mozilla-Profile /F
/F = force (no confirmation requests)
Sylvander
01-22-2003, 11:39 AM
Taking your advice Sleddog, I down loaded "fsync" and unzipped it [to a temporary folder] and read the "fsync_en.txt" file [English, no install instructions], then ran the "fsync.exe" file expecting it to be an install programme.
A DOS window flashed on the screen for a moment [too short to allow any reading of the text within] and shut down.
I thought perhaps it may be intended that this is "fsync" itself and that it works from the folder to which it is unzipped and a line would be put in some [Windows98] file specifying it's location.
I used the find facility to look for some reference to "fsync.exe" in any file on the C: drive without any useful result [the only files were the ones I unzipped]
When you specify the "fsync" command in a batch file, how does DOS or whatever know where to find "fsync"?
I'm mystified how to set this up ready to work and there seem to be no help files or substantial instructions for setup or use.
Could you help?
Dinosaur
01-25-2003, 10:26 PM
If you are willing to use a very handy utility and direct the backup functions yourself rather than having it done automatically, try Ztree (www.ztree.com). It is cheap, perhaps a free download. I paid for a registered version.
I use it to do all my data file backups. It does a lot of other handy functions. It has been my experience that the setup of automated backup utilities is time consuming and never quite does what I want done. I have been very happy using Ztree, which requires you to direct the activities.
BTW: I do my backups on an as required basis, rather than trying to make up a regular schedule. I do it right now for a particular directory if I have done a lot of recent work in it. Some directories might not get backed up for a long time if I have not been using certain applications. The fancy automated backup utilities are just not as versatile as I can be.
Ztree does not replace Windows Explorer, but I find it useful for various functions other than backups. It does some things more conveniently than Explorer and it does some functions not available via Explorer.
Due to this Thread, I have created another Thread describing some of the capabilities of Ztree.
Vic 970
01-26-2003, 12:36 PM
I've just started to use 'my own backup' which is free from here...
http://www.pcworld.com/downloads/file_description/0,fid,7023,00.asp
seems to work rather well. I did try an earlier version some time ago, but it did not have disc scan, which the new version does. I have only bkp up to hdd at the moment, but will try the disc scan at a later date.
I have also done a bkp with powerdesk.
like you I don't like these automated things, more trouble than theyre worth, and you don't find the probs until you need to restore.
autosave has similar drawbacks, it always decides to save just after you made a cock up.
sleddog
01-27-2003, 09:35 AM
Originally posted by Sylvander
Taking your advice Sleddog, I down loaded "fsync" and unzipped it [to a temporary folder] and read the "fsync_en.txt" file [English, no install instructions], then ran the "fsync.exe" file expecting it to be an install programme.
A DOS window flashed on the screen for a moment [too short to allow any reading of the text within] and shut down.
I thought perhaps it may be intended that this is "fsync" itself and that it works from the folder to which it is unzipped and a line would be put in some [Windows98] file specifying it's location.
I used the find facility to look for some reference to "fsync.exe" in any file on the C: drive without any useful result [the only files were the ones I unzipped]
When you specify the "fsync" command in a batch file, how does DOS or whatever know where to find "fsync"?
I'm mystified how to set this up ready to work and there seem to be no help files or substantial instructions for setup or use.
Could you help?
fsync.exe is indeed the program (a DOS program). If you simply click on it Windows will pop open a DOS window and run it. Because you haven't specified any command line parameters by simply clicking it, it immediately exits and the DOS window closes.
In a batch file there are several ways of telling DOS how to find fsync:
1. Put fsync.exe in a folder that is in your path, for examples, C:\ or C:\Windows.
2. Specifiy the full path for fsync in your batch file, e.g.,
c:\utils\fsync.exe [source] [destination]
3. Put fsync.exe in the same folder as your batch file. When the batch file is run, it usually takes its own folder as the 'active' folder, so it should be able to find the fsync.exe
#2 is the foolproof method.
Sylvander
01-27-2003, 10:24 AM
I decided to put it in C:\.
Is there anywhere I can go to get information on switches? Which ones and what they do?
What’s the best way to run the batch file?
1. Use "Autoexec.bat"?
2. Use "Task Scheduler" to run one of my making?
3. Put one on the desktop and run it manually?
I tend to favour synchronising automatically at every shutdown.
vBulletin v3.6.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.