in
Support Center

Which copy command to make offsite copy?

Last post 07-22-2008 8:19 AM by robinh. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 07-07-2008 10:19 AM

    Which copy command to make offsite copy?

     I am backing up from c: to d: because it is fast.  But I would also like to put a copy of the backup on a remote server.  I see that I can use a batch file to do this, but a command such as

    XCOPY d:\backup\* \\MYSERVER\backupCopy

    would keep copying the whole backup set.  Since the full backup is around 100Gb, this is grossly inefficient and risks corrupting files successfully copied on a previous run.  I am using Vista SP1.  I would think that I ought to use robocopy because it is supposed to be more robust.

    So what would be a good script that would just copy the new incremental file and not overwrite previous backups?

    How to make it as robust as possible?

    Should I use robocopy? ( The documentation is a bit thin for some of the robocopy options)

    If so which command line options work best for this task?

  • 07-08-2008 2:34 PM In reply to

    Re: Which copy command to make offsite copy?

    There are probably several ways to do what you want.  Here is a Technet article that describes all the switches available with Robocopy.  I haven't done this myself, but you could probably use the mirror mode (/MIR) to keep the source and destination in sync, or use time-based exclusions to exclude files older than N days (/maxage:<N>).
  • 07-09-2008 7:29 AM In reply to

    Re: Which copy command to make offsite copy?

     Thanks.  \mir looks as though it should deal with a failed copy better ( by trying again the next run).  I have edited my backup job and will see what happens tonight.


  • 07-09-2008 9:13 AM In reply to

    Re: Which copy command to make offsite copy?

    I use ShadowProtect Desktop 3.2 to backup my c: drive to external storage. Works great and very fast.

  • 07-09-2008 6:05 PM In reply to

    Re: Which copy command to make offsite copy?

     Yes.  I started off trying to do this.  But on two runs doing a full backup of 100Gb I ended up getting a device error on the remote storage device, each time after about six hours and about 80% complete.  I thought maybe I had run out of space but even though I deleted old backups to ensure it was not that problem, it still failed.  A subsequent drag and drop of the 100Gb backup file to the server had no issues which suggested to me that it was not a hardware issue.  If the issue is software, who's software?  Vista? SP? XP? LinkSys?

    I have a 100-base LAN thru a Linksys router.  The other machine is a fairly new "server" running Windows XP Media Edition.  So I should have a 100Mbit connection.

    I did have a RAID system, but after the RAID rebuild failed and based on other advice I got on this forum, I have given up on RAID.  I am also looking for a fairly quiet life.  Now I backup from c: to d: which is very fast.  Hopefully a SP backup is more reliable than software-based RAID.  This should protect against hardware failures.  The server copy backup is to guard against theft, etc.

     

    ...later...

    P.S.

    The exact failure when writing to WXP was:

    24-Jun-2008 10:52:03    service    100    service (build 42) started job manually as full
    ...

    24-Jun-2008 17:37:37    sbfile    108    retrying file write after error (-31 A device attached to the system is not functioning.)

    24-Jun-2008 17:37:41    sbfile    107    last message repeated 12 time(s)

    24-Jun-2008 17:37:41    sbfile    108    retrying file write after error (-31 A device attached to the system is not functioning.)

    24-Jun-2008 17:37:56    sbfile    107    last message repeated 20 time(s)
    24-Jun-2008 17:37:56    sbfile    503    Fatal I/O error on \\MYSERVER\Backups\Vista C backup-b001.spf offset 13b0fe5200 on write (-31 A device attached to the system is not functioning.)
    24-Jun-2008 17:37:56    sbfile    109    deleting the incomplete output file(s)

    Not that this was after about 7 hours!!





  • 07-11-2008 6:12 AM In reply to

    Re: Why does copy not run?

     So I added an external batch file to SP.  Now at the end of a backup the last entry in the log says:

    10-Jul-2008 06:01:37    service    105    external command "C:\Program Files\StorageCraft\ShadowProtect\CopyBackup.cmd" started

    CopyBackup.cmd is like this:
    robocopy "d:vista backups" "\\myserver\backups" /mir
    pause

    I tested the backup script by making a shortcut to it on the Vista SP1 desktop and when I double click and run it manually, replicate works correctly.  As I recall, I specified where to find the batch file by navigating to it.  My source and dest are full paths.

    But it does not run from SP although the log says it started as above.

    I look in d: and the overnight SP backup has made a new incremental C_VOL-b003-i011.spi of 4.6 mB and the server is has space.

    I look on the server and it is not there.

    I double click on the cmd shortcut and the new incremental gets copied to the server proving that the batch file works and space, etc.

    So I can do it but SP can't???

    Is this something to do with credentials and Vista permissions? When SP runs, it doesn't give the cmd file enough permission?

    If so, how to fix it???

    I have the time-out set to 10 minutes.

    At the end of the timeout, should SP make any more entries in the log?,  as I note

    10-Jul-2008 06:01:37    service    105    external command "C:\Program Files\StorageCraft\ShadowProtect\CopyBackup.cmd" started
    is the last entry.

    Help! 

  • 07-11-2008 5:48 PM In reply to

    Re: Why does copy not run?

    The text that you enter into the text box for the pre (or post) command should be something like this:

     

    C:\windows\system32\cmd.exe /C "C:\Program Files\StorageCraft\ShadowProtect\CopyBackup.cmd"

     

     

  • 07-12-2008 5:39 AM In reply to

    Re: Why does copy not run?

     Thanks.

    Yes I see, you think I should specify a .exe.

    The advanced options tab is a bit misleading as it lists "Commands".  Furthermore the manual, p50, says "You can specify command files (.exe, .cmd, .bat) to be automatically executed ..."

    However, what I tried did not work so I will try your idea tonight...

  • 07-12-2008 5:48 AM In reply to

    Re: Why does copy not run?

     I am afraid that did not work either.

    The last line in the log file now reads

    12-Jul-2008 06:01:00    service    105    external command "C:\windows\system32\cmd.exe /C "C:\Program Files\StorageCraft\ShadowProtect\CopyBackup.cmd"" started

    But again a double clicking on the shortcut to the cmd file worked fine.

    Here is the cmd file:

    robocopy "d:vista backups" "\\myserver\vista backups" /mir
    pause
     

    Is it Vista credentials??

    SP is running on Vista SP1.  The copy is to "XP Media center edition" where  "\\myserver\vista backups" is set up as a share.

    A thought.  When I backup directly to a remote server, I have to fill in the credentials dialog so that SP has permission to access the server.  When I backup to local d: there is no corresponding credentials dialog.  If SP runs as a service, how can it confer credentials to a child process if it has none to give?

    Am I attempting mission impossible?

  • 07-12-2008 7:02 AM In reply to

    Re: Why does copy not run?

     Looking around I came across this:

    http://bytes.com/forum/thread580023.html

    which includes this

     "Services generally run under the Local System account, which can do lots
    (and lots) of things on that, one machine, but knows absolutely nothing
    about the network.
    If you're on Windows Server 2003, use the Network Service(?) account or,
    failing that, nominate a domain account and run the service under that."

    This is getting to be much more complicated than I ever thought.

    It seems that programs such as robocopy or xcopy are not suitable for this task.  A copy program is needed that allows machine name user name and password to be specified in the command line for this do work if there is no mechanism in SP.

    ftp??

    Bulldog above says why don't I backup directly to my server.  That is starting to sound more attractive except that doesn't work either as my post above gives in more detail, after 6 hours of backing up, I get the error

    24-Jun-2008 17:37:56    sbfile    503    Fatal I/O error on \\MYSERVER\Backups\Vista C backup-b001.spf offset 13b0fe5200 on write (-31 A device attached to the system is not functioning.)

     

    It doesn't tell which device.  It is repeatable (twice) and all software is SP or windows.

  • 07-14-2008 12:08 PM In reply to

    Re: Why does copy not run?

    Whoops, my mistake.  Those instructions are good for ShadowProtect 2.x, however they are incorrect for 3.x.  If you want to execute a script as your presnap/postsnap/postbackup command, then you do NOT need to enter the path to cmd.exe as part of the command.  You just enter the path to the script in the text box.

    You're right that the ShadowProtectSvc.exe, by default, runs under the logon session of Local System.  Therefore any child processes spawned by ShadowprotectSvc.exe (such as presnap/postsnap/postbackup scripts) will also execute within that same logon session.

  • 07-22-2008 8:19 AM In reply to

    Re: Why does copy not run - fixed (work around)

     I am using XP Media centre edition for my server.  Its licence seems to support five connections.  I know how to use sockets, but I am not quite sure of MSs definition of a connection.

    Anyway, part of my problem is that I seem to have too many connections or too many users according the error I see.  Who are all the users/connections?  To me it looks as though there is just me and SYSTEM when I run a service.  How to know exactly??  Key problem: too many!

    So I gave up trying to do this with SP. a) It uses up connections, b) It doesn't seem to deal with credentials.

    Instead I use Vistas scheduler to call by copy script about an hour after SP backup runs.  That's time enough for incremtentals .  That way there are no SP connections/users.

    Then I changed my copy script to this:

    net use z: /d
    net use z: "\\MYSERVER\ backups" mypassword
    robocopy "d:vista backups" z:\ /mir
    net use z: /DELETE
    pause

    NET USE allows me to specify credentials.  I did not test if I really need password. "\\MYSERVER\ backups"is a share.

    I also have a desktop shortcut to this to test it or repeat at any time manually if something goes wrong.

    I find that if I use Windows Explorer to look at  any server folder while I am running the copy it fails with  "System error 1219 has occurred" "Multiple connections to a server  ... by the same user using more than one user name ... are not allowed ..."

    Maybe its not the number of connections but the number of users.

    Some network expert could probably deduce exactly what is going on and tell me a cleaner way of doing this.  But I now have a work around and that's as much time as I care to spend on it myself.

    StorageCraft ought to think about this and figure a way to make it work calling from SP backup.  Their manual suggests an offsite copy as a good idea.  It is not unusual for desktop users to have less than an industrial strength server.

Page 1 of 1 (12 items)
(c) StorageCraft Technology Corporation 2008