none
Scheduled backup to network drive RRS feed

  • Question

  •  

    I have folder pairs created to backup my files from one hard drive to another, and from one computer to another. Both work perfectly with SyncToy.exe. However, I created a Scheduled Task using the -R argument to run all folder pairs. All my jobs that copy from one hard drive to another work perfect, but the jobs from one computer to another are not. I see the following error message for my computer-to-computer pairs:

     

    SyncToyCmd has detected that the folder pair Greg-Server has not been synchronized yet. Please run SyncToy.exe to complete the initial synchronization.

     

     

    I'm running Windows Vista Business SP1 and SyncToy Beta v2.0.0.0 (Built 10/12/07)

    I'm copying from hard-drive D:\ to mapped drive Z:\

    I have full write permissions to the folder I'm copying to. As I said, when I run SyncToy.exe, it sync's perfectly. The message from the logs says I need to complete an initial sync, but that has already been done.

    Tuesday, April 15, 2008 7:08 PM

Answers

  • I think Snmmcd 's suggestion also is a good one for workaround the problem.
    Beside that, I noticed most of you used SyncToy 2.0 beta, I strongly sugguest you upgrade it to SyncToy 2.1.
    And I did a test with this problem ' s repro steps, it worked well on my vista 32 bit, no issues. Just notice, when you create the mapping, please make sure select the "Reconnect at logon", otherwise, after you restart the machine, this connect mapping will lost.



    Thanks,
    Ping


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, December 1, 2009 8:22 AM

All replies

  • Greg,

    Unfortunately I have the exact same problem. Hopefully someone will have an explanation.

    I am running Windows XP SP2 and SyncToy Beta v2.0.0.0 (Built 10/12/07). I am coping from a My Docs folder on a notebook to a shared folder on another computer on my home network.

    Thanks, Bill

    Monday, April 21, 2008 2:47 AM
  •  

    Same issue here.

     

    Scenario is pretty much as you describe...computer to computer sync.  Runs fine manually but bombs out when I try to run the scheduled job with SyncToyCmd.

     

    I'm running Windows Vista Vista Home Premium and SyncToy version 2.0.0.0, built 2007-10-12.

     

    Since I was running an earlier version; I had thought that maybe there was corruption in the job (ie. folder pair .bin files not recognized or something).  Tried deleting both; recreating the folder pair and running the sync manually; however, the log for the scheduled job still states the folders need to be sync'd.

     

    -ksm

    Thursday, May 1, 2008 1:56 AM
  • Has worked for me.

    Windows Server 2003 (target computer or 'right') via mapped drive Z:
    Windows Vista Business (no SP1 yet) (source or 'left').
    SyncToy 2.0 beta.

    Did nothing special.
    It also worked for multiple forlders and actions when scheduled as task at start-up (shut down did not work).

    Have admin rights, possibly the difference?

    I do have 2 questions though:
    - Is there a chance to channel the deletions performed by SyncToy to a specific folder instead of the recycle bin
    - What happens if a file is in use (like Outlook .pst which I tend to open first thing in the morning while Sync is still running)

    Otherwise I am quite happy with it.
    Saturday, May 3, 2008 12:12 PM
  •  

    Hi Greg,

     

    I'm having the same problem as well. 

     

    I'm running Vista Home Premium 64bit SP1

    I'm also copying from the hard drive to a mapped network drive (on an XP Pro machine)

    Full write permissions, etc, etc..

    Works from the .exe, bombs with the same error you got during a scheduled run, even if I run the schedule manually.

     

    Has anyone found a solution/workaround? 

     

    Thanks

    Thursday, May 15, 2008 2:50 PM
  •  

    Ok,

     

    My scheduled tasks, ie. SyncToy,  are now working for me.  What I have had to do is change the security options under the General Tab of the scheduled job to read "Run only when user is logged on". 

     

    I think what might be happening is that the task scheduler runs using a different account profile than the account I use to authenticate to the network shares.  When the task scheduler fires off, its account does not have access to the share and the job bombs.  By changing the option to run only when user is logged on, I think the task scheduler then runs using my account profile and is able to authenticate to the network share.  I haven't really investigated further but it sounds right in my head. :-)

     

    This option may not work for all; however, since I'm always logged into my computer it does work fine for me.

     

    -ksm

     

     

    Friday, May 16, 2008 12:02 AM
  •  

    Thanks for the reply.

     

    I tried that before and didn't notice any difference.  Just to be safe, I tried it again just now.  I set the security option of the scheduled task to "run only when user is logged on", saved, and ran the scheduled task right from the scheduler. The task completed almost instantly and when I checked the log of SyncToy I see the following message:

     

    SyncToyCmd has detected that the folder pair John (My Documents) has not been synchronized yet. Please run SyncToy.exe to complete the initial synchronization.

     

    On a side note, I have full admin access to both machines and the schedule item is set to run with highest privileges. The destination drive is on the XP pro machine and is mapped as drive s: on the Vista 64 bit computer.

     

    Also, SyncToy runs perfectly from the executable. The folders are absolutely synchronized.

     

    I appreciate your help, but I don't think it's gonna solve the problem I'm having.

     

    Thanks

     

    -jb

    Friday, May 16, 2008 3:50 AM
  •  

    Is it possible that your Mapped Network drive is not 'mapped' when a scheduled task runs.

     

    Write a Batch script that lists your mapped drives to a file and then schedule that script.

     

    The script should look something like this (ListDrives.cmd).

     

    @echo off

    net use > c:\ListDrives.txt

    exit

     

    Run it interactively first and see the output by editing c:\ListDrives.txt

     

    You might see something like this...

     

    New connections will be remembered.


    Status       Local     Remote                    Network

    -------------------------------------------------------------------------------
    OK           Z:        \\Pauline\Media           Microsoft Windows Network
    The command completed successfully.

     

    The Schedule it, run it again and see what the output is like then.

     

    You might see something like this...

     

    New connections will be remembered.

    There are no entries in the list.

     

    If that's the case you may have to write a 'wrapper' script to map the drive before it runs SyncToy with the -R switch.

    • Proposed as answer by Ping Lu Wednesday, September 2, 2009 8:00 AM
    Saturday, May 17, 2008 9:35 AM
  • Aha! Now we're getting somewhere.

     

    I created the script file you suggested and when I run it interactively I see:

     

    OK S: \\FILESERVER\Shared2\ ...

     

    However, when I run it from the schedule I see:

     

    Unavailable S: \\FILESERVER\Shared2\  ...

     

    Bingo! Any ideas why this is happening? I'm worried that if I script a mapping wrapper that it might interfere with the existing mapping. I suppose I can try it and see, but I wonder if there isn't a setting that makes the existing mapping available to scheduled tasks?

     

    Thanks for your help, I never would have suspected that programs in scheduler couldn't access the mapped drive.

     

    -jb

    Saturday, May 17, 2008 5:19 PM
  •  

    Maybe an idea is to try a UNC mapping rather than a mapped drive for the RHS of the pair.

     

    i.e. the right hand folder is in the form \\fileserver\shared2\....

     

    I think a scheduled task runs in the context of the user specified but doesn't affect the current interactive session.

     

    I actually have a user called SysOP that I run all scheduled tasks under.  This way I don't get CMD boxes popping up on the desktop when jobs run.

     

    I have a script I use to wrap my SyncToy 2 backup that goes to a USB drive.  It checks the drive is attached and has the correct drive letter before calling SyncToyCmd.exe with the -r switch.  It writes to a log file and only shows the result if a error occurs (ie not ERRORLEVEL 0). Works a treat.

     

    I'd try a script with maybe another pair using a different drive letter or a UNC and see how you get on.  Maybe a case of suck it and see.

     

    B

     

    Saturday, May 17, 2008 5:44 PM
  • UNC mapping does work, unfortunately several of my combined folder paths go beyond the 260 character limit of SyncToy. 

     

    I've seriously considered reorganizing the directory structure of my file server to bring the paths within range. But that would feel an awful lot like defeat. I hate that.

     

    My current plan is a script that will map the path to a local drive other than S: so there won't be a chance of messing up the mapping that I use interactively; Then, run the SyncToyCmd.exe -r using the new mapping; Finally, unmap the drive.

     

    SyncToy won't create a folder pair to a non-existing path so first I'll manually have to map my drive using "T" for example. create the SyncToy folder pair and then unmap T:. The script will use map/unmap T: when it runs.

     

    I'm still surprised that the existing mapping is unavailable in scheduler. Just doesn't seem right.

     

    I like your idea of the SysOp user, that's pretty bright.  I'd love to see your USB checking script, that sounds very useful.

     

    Thanks for your help

    jb
    Sunday, May 18, 2008 1:49 PM
  • Sounhds like a plan to me.

     

    Have put three scripts in:

     

    http://www.respectableimage.com/download/myscripts.zip

     

    One is my SYNC to USB and the other two are scripts I've used to do drive mapping in batch.  I'm sure you can coble something together with these.  I'll delete zip in 7 days time or once I know you've got them.

     

    Please do edit the scripts first and maye sure you're happy with them before you run them.

     

    B

     

    Sunday, May 18, 2008 4:04 PM
  • These are great.  Definitely gonna be a big help.

     

    Thanks again.

     

    -jb

     

    Monday, May 19, 2008 2:06 AM
  • start>Run> ntbackup
    u can also do advanced settings for scheduling daily weekly or monthly....
    • Proposed as answer by snmmcd Tuesday, December 1, 2009 12:19 AM
    Friday, July 10, 2009 2:30 PM
  • I was able to get this working by adding "net use <drive letter> <\\network system\folder>" into a batch file directly before my sync call. I used the same drive mapping I am using while logged in, and had no issues.

    example:

    While logged into the system I have a network system \\foo\test mapped to a drive letter P:

    in my batch script I added "net use P: \\foo\test" directly before my sync call. This made the network drive accessible even while I was not logged in.
    Tuesday, December 1, 2009 12:26 AM
  • I think Snmmcd 's suggestion also is a good one for workaround the problem.
    Beside that, I noticed most of you used SyncToy 2.0 beta, I strongly sugguest you upgrade it to SyncToy 2.1.
    And I did a test with this problem ' s repro steps, it worked well on my vista 32 bit, no issues. Just notice, when you create the mapping, please make sure select the "Reconnect at logon", otherwise, after you restart the machine, this connect mapping will lost.



    Thanks,
    Ping


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, December 1, 2009 8:22 AM