1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Resolved Using a 2nd HD as a safety net

Discussion in 'Windows XP' started by drhans2, 2012/03/02.

  1. 2012/03/02
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    I'm looking for a way to create my own little safety net by utilizing a reclaimed HD from a old computer. The 2nd HD would be wiped clean & installed along side my current active HD.

    Ideally it would automatically copy or update all the Files & Sub Folders that are in the current user's "My Documents" folder on the computer? (in my case there is only 1 user).

    Could a dos command "bat file" be linked to the "Shut Down" or "Hibernate" command, Maybe some addition to the MSCONFIG file? Something that would automatically update as needed on the 2nd HD every time the computer is shut down.

    That type of option would provide some assures that at least my most current personal files could be recovered if needed. (Backups are OK but in reality not done in a timely manner and sadly require more time & effort.)

    Is it also possible that the 2nd HD could be power down (not kept continuously spinning) most of the time with the Power Option in Control Panel of "Turn off HD after 1 minute" (of inactivity I assume).

    Or would the power remain on (disk spinning) by default since the 1st HD would have the same option checked but is in continuous use? ( The Power Option only stated "Turn off power to hard disks..)

    thanks,
    denny
     
  2. 2012/03/02
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
    You are rather asking for the moon :)

    Your best bet is to image your C:\ drive (with 3rd Party Software - Acronis ? ) to the second hard drive weekly on a schedule which Acronis will set up and to use third party backup software such as Synchback to make an incremental back up of your data to that drive on, say, an hourly basis as I have done for many years.

    As the drive is internal power settings will affect all internal drives. No real issue - my internal drives (4) run all the time - can't bear the delay in them spinning up when I want to use them :)
     

  3. to hide this advert.

  4. 2012/03/02
    fdamp

    fdamp Well-Known Member

    Joined:
    2009/04/09
    Messages:
    476
    Likes Received:
    12
    There's one drawback to your idea. If your C: drive's OS gets blown, you can't get to the back-up, unless you have another copy of the OS and can boot from the other drive. I had a physical damage issue on the part of the C: drive where Windows was located. Fortunately, I'd been doing back-ups to a USB hard drive. I bought a new 300GB drive and installed it as the C: drive and put the damaged one in as the slave. I loaded a new copy of Windows on the new C: and was able to get the data off what was re-designated as "F: ".

    There were just a few data files that din't make the transfer and I got those off the USB disk. I couldn't get any of the operational program files to transfer, but I had CDs of most. I just had to buy a new version of Quicken. After that incident, I've decided to get hard disk versions of any software I buy, rather than on-line downloads. Usually, on-line downloads have a limited shelf life and you can't go back after a few months and get another copy.

    I still use the USB as my primary back-up, but I store quite a lot of data on the F: drive.
     
    Last edited: 2012/03/02
  5. 2012/03/02
    rsinfo

    rsinfo SuperGeek Alumni

    Joined:
    2005/12/25
    Messages:
    4,076
    Likes Received:
    178
    If both the drives are of the same capacity, I would create a RAID 1. That way everything would be protected.
     
  6. 2012/03/03
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
    If you image your C:\ drive to an independent hard drive - internal, external or both (as I do) then if the OS drive/partition fails it is a simple matter of bootoing from the Acronis Rescue CD and pointing it to the image on the other drive for a full restoration. Windows 7 imaging software works the same way with a rescue CD.

    FWIW I keep no data at all on the C:\ drive
     
  7. 2012/03/03
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    For XP, what I do for myself and my clients is:

    1. Partition the first hard drive with a small operating system partition, usually no larger than 30-40 GB, and a second partition using the remainder of free space on the drive. Install all desired 3rd party software to the C drive, configure and optimize computer for best performance.

    2. I move the My Documents to the second partition.

    3. I use Norton Ghost or similar software to make an image of the operating system partition and store it on the second partition, or preferably on a second hard drive. This can also be done regularly, provided one has the free space on the drive.

    4. I use a backup script which copies desired files to another drive or other media such as a thumb drive or external usb drive. The script can be run manually or via task manager or policy editor.

    Here's a sample backup.cmd I use:

    Code:
    @echo off
    :: variables
    set drive=Z:\
    set backupcmd=xcopy /q /s /c /d /e /h /i /r /y
    
    echo ### Backing up My Documents...
    %backupcmd%  "%USERPROFILE%\My Documents"  "%drive%\My Documents "
    
    echo ### Backing up Favorites...
    %backupcmd%  "%USERPROFILE%\Favorites"  "%drive%\Favorites "
    
    echo ### Backing up email and contacts (MS Outlook)...
    %backupcmd%  "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook"  "%drive%\Outlook "
    To run at Shutdown, use Group Policy Editor:
    1.) Start, Run, gpedit.msc
    2.) Select Computer Configuration, Windows Settings, Scripts (Startup/Shutdown)
    3.) Double Click Shutdown
    4.) Click Add, and browse to the script.
    5.) Click OK, and OK again.
    6.) Close Group Policy and Restart Computer.
    7.) The script should now be run on shutdown.

    It only takes a long time to copy on the first run. After the initial copy, the only files that get copied are the ones that have changed since the last copy.
     
  8. 2012/03/03
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338

    Be careful(!) XCOPY ignores file and folder name aliases. (And Windows uses file and folder ALIASes all over the place in the Windows registry).

    If you want some proof, try this little test:
    1. In Windows Explorer create a folder named "Test" in the root directory of drive C:.

    2. Within this "C:\Test" folder, create a folder named "Source ".

    3. Within this "C:\Test\Source" folder, create the following three folders:
      WindowsBBS is #1
      WindowsBBS is #2
      WindowsBBS is #3​

    4. Get to a command prompt and type the command:
      dir c:\test\source /x
      and you'll see both the alias and the folder names like so:
      WINDOW~1 WindowsBBS is #1
      WINDOW~2 WindowsBBS is #2
      WINDOW~3 WindowsBBS is #3​
      which is all well and good.

      We're now ready to test XCOPY.

    5. In Windows Explorer delete the "WindowsBBS is #2" folder.

    6. At the command prompt, use your xcopy command (from above) like so:
      xcopy /q /s /c /d /e /h /i /r /y C:\Test\Source C:\Test\Dest

    7. Now let's take a peek in C:\Test\Dest to see how XCOPY did:
      dir c:\test\dest /x
      Results:
      WINDOW~1 WindowsBBS is #1
      WINDOW~2 WindowsBBS is #3​
      :eek: The alias for the "WindowsBBS is #3" folder is now "WINDOW~2 "!?
    Because XCOPY doesn't copy aliases. :(
     
  9. 2012/03/03
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    @SpywareDr

    Yes, but you won't find aliases in the dirs that need to be backed up, such as mail folders, bookmarks, My Documents, quickbooks/quicken files, etc. There's no point in using xcopy to copy Windows folders, system files, Programs Files, etc. Just the stuff one needs in the event of catastrophe.
     
  10. 2012/03/04
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338

    Sure you will. Do a:
    dir "%userprofile%" /a /s /x /p
    (on both an XP and 7 box) and note all the names with a tilde ( "~ ") in them.

    In the registry on an a XP Pro box here, I see:
    C:\DOCUME~1\<username>\LOCALS~1\MICROS~1\FORMS\IMAPP~1.LOC​
    And on a 7 Ult (64) box:
    C:\Users\ADMIN~1\AppData\Local​
    If a file or folder is over eight characters long, or if it has an extension of more than three characters, or if either have a space in them, Windows will create an alias . . . which XCOPY ignores.
     
  11. 2012/03/04
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    Wow.. never thought just trying to copy the latest "My Documents Folder & Sub Folders" without any user input at Shut Down to a 2nd HD would be so difficult..

    Seems like there could or would be a Windows Option built in to the OS to address that issue.. seeing that those files are the ones most valued by most when disaster strikes.. (Something other than the Windows Backup Option which is not a fail safe method but better then nothing if or when done routinely.) Key word here is : (if & done)....


    PeteC & all others.. I do have a image of my C:\ drive and when I created it my goal was to update it at least quarterly.. well it's been 2 years since then... so that's the driving force behind my question. Key missing word here is: ( lazy)...

    I do manually copy the folders to a thumb drive but at no set schedule, & thumb drives get scattered and used randomly.. So my thought was to find a "Hail Mary Pass " solution to the problem..

    fdamp.. Your scenario is what I'm talking about... my only concern are the personal files .. that could be salvaged when slaving to different computer.... repairing or reinstalling Windows is a piece of cake when compared to recovering all your personal data files from a HD that goes belly up..

    rsinfo... Raid is not a option for my hardware on this computer.. but thanks it would work best as a effortless fail safe option..

    Tonyt.... Your script is just what I'm thinking about.. When I build my next computer I'll use the 2 partition method you suggested.. thanks it's does simplified the operation..

    The option to also save my email is appreciated.. something I overlooked.. I'll need to add lines for Thunderbird profile & Firefox's bookmarks as well.

    I assume that I must only change " USERPROFILE & drive" from your script to (my profile's name) & (drive letter) of the drive I want to copy the files to and leave the rest intact.. ? Not really sure what to do about the (set drive=Z:\) entry..

    SpywareDr... You raised a concern over the xcopy command.. is there a different option or something else I should use?

    Is the 'My Document' Folder... not the Sub Folders under it part of the Windows OS (seems to me that there are restrictions or protections about moving or renaming the 'My Documents' folder possibly making it part of the Windows OS) and would your example prove to trouble for me when deleting files from those folders? Is your concern still a issue when no OS files / folders are copied?

    Thanks to all for your input..
     
  12. 2012/03/04
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    So we have advance this far and still find that were restricted to the rudimentary DOS rules.. how discouraging..
     
  13. 2012/03/04
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338

    Windows Explorer.
     
  14. 2012/03/04
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    Your losing me.. do you mean change the xcopy command to just the copy command? How would you get the sub folders? Would the same /options apply?
     
  15. 2012/03/04
    SpywareDr

    SpywareDr SuperGeek WindowsBBS Team Member

    Joined:
    2005/12/31
    Messages:
    3,752
    Likes Received:
    338
    If you need to use a command-line type program, the only one I know of is XXCOPY.

    Been a l-o-n-g time since I used it though. Double-check and make sure it's copying everything correctly, including the aliases, before trusting it.
     
  16. 2012/03/05
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    You're missing my point. There's no need to backup AppData or similar directories. Nor is there a need to backup the registry. I am talking specifically about copying the user's important files, e.g. pictures, music, documents, bookmarks, mail folders or outlook pst, etc etc.

    xcopy will write out the full names of such files, and there are no aliases to be copied. Even the actual My Documents folder has no aliases in it.
     
  17. 2012/03/05
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    No need to change %UserPrifile%, it's a system variable and applies to the user that's logged on Windows.

    Backup the whole TB profile.

    I usually export bookmarks as an htm file and copy that, It can easily be imported.

    set drive=Z is the target drive where files get copied to. I usually set the drive as Z so as to avoid confusion with other drives.For example, if use a thumb drive, stick it in, go to Disk Management and change its drive letter to Z. That particular drive will then always be assigned Z when it's plugged in.
     
  18. 2012/03/06
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    TonyT...

    If I understand correctly.. this is what I need to do?

    A-1. Save the text below to a file named... Backup.cmd

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    @echo off
    :: variables
    set drive=Z:\
    set backupcmd=xcopy /q /s /c /d /e /h /i /r /y

    echo ### Backing up My Documents...
    %backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents "

    echo ### Backing up Favorites...
    %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites "

    echo ### Backing up email and contacts (MS Outlook)...
    %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook "

    echo ### Backing up email and contacts (Thunderbird)...
    %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Thunderbird" "%drive%\Thunderbird "

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    A-2. Place that file in... C:\

    A-3. Follow steps 1 thru 7 below...

    To run at Shutdown, use Group Policy Editor:
    1.) Start, Run, gpedit.msc
    2.) Select Computer Configuration, Windows Settings, Scripts (Startup/Shutdown)
    3.) Double Click Shutdown
    4.) Click Add, and browse to the script.
    5.) Click OK, and OK again.
    6.) Close Group Policy and Restart Computer.
    7.) The script should now be run on shutdown.


    A-4. Go to Disk Management and assign the letter Z to my 2nd HD installed for this backup procedure.

    A-5. Test the operation...

    Question... Can I use REM in the front of the command line for Thunderbird to prevent that command from backing up Thunderbird at this time?

    I have a few years of email saved (12 GB) and I first need to delete most of it.

    Would this work?

    rem echo ### Backing up email and contacts (Thunderbird)...
    rem %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Thunderbird" "%drive%\Thunderbird "


    thanks...
     
  19. 2012/03/07
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    Yes, you can use REM or :: (double colon).

    If your second hard drive is an internal drive, just change
    set drive=Z:\
    to the drive's existing letter.

    First, I'd do a manual backup because it will take some time.

    Then add the policy. To test it, add 1 or 2 new files to My Documents, restart the comp, check if the new files made it to the other drive.
     
  20. 2012/03/08
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    Thanks TonyT... I'll put the plan in operation this weekend and report back..
     
  21. 2012/03/10
    drhans2

    drhans2 Well-Known Member Thread Starter

    Joined:
    2003/09/07
    Messages:
    261
    Likes Received:
    1
    TonyT

    I tested the script.. but on a older up to date Windows XP Home Edition computer. I was not able to access the Group Policy Editor and did some searching..

    I found that Group Policy Editor is not available on the Home Edition of XP. I found a link to http://robertthompson.me.uk/xptricks/gpedit.htm

    I downloaded the zip file and installed as per the instructions in the Read This.txt file. I got some pop up error notices and then tried to associate the .dll files using the run cmd. Some dll associations succeeded and some did not.

    I tried and was able to open the added Group Policy Editor and point the Shutdown Folder to the Backup.cmd file I placed in the C:\ .

    I than manual copied the all my files in My Documents Folder to the spare internal HD, than added two files to the My Documents Folder on C: drive.

    I shut down the computer and when restarted the two added files were not copied to the spare HD. I did a search on the 2 internal HD's and the two added files weren't added anywhere.

    Maybe the Group Policy Editor I needed to add didn't fully load correctly..I did get error notices during the add.

    I don't know if this could be part of the problem.. but just looking at the scrip verbiage this struck me as something that I needed to ask about.. I noticed that there is no . between the backup & cmd in the script you provided as a example.. set backupcmd=xcopy & %backupcmd% Should there be one there?


    Here's a copy of my backup.cmd file.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    @echo off
    :: variables
    set drive=G:\
    set backupcmd=xcopy /q /s /c /d /e /h /i /r /y

    echo ### Backing up My Documents...
    %backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents "

    echo ### Backing up Favorites...
    %backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites "

    rem echo ### Backing up email and contacts (MS Outlook)...
    rem %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook "

    rem echo ### Backing up email and contacts (Thunderbird)...
    rem %backupcmd% "%USERPROFILE%\Local Settings\Application Data\Thunderbird" "%drive%\Thunderbird "

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



    Only other thing I could do is to try this on my main XP Pro machine.. but I would rather test the operation on a sacrificial computer first..

    Thanks again for the assistance..
     
    Last edited: 2012/03/10

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.