Announcement

Collapse
No announcement yet.

Various problems with backup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Various problems with backup

    I'm sure the answer must be straightforward, but I cannot find it anywhere. Basically, all I want to do is to backup several users files onto one remove FTP server.

    In order not to overwhelm our internet connection, I synchronise all our users onto our file server during the day, then synchronise the fileserver with the remote server at night.

    However, I have two problems:

    1) If the local user does not have his machine on at the time, the script stops: Script Error: Unable to load base folder. User Canceled. I obviously want the script to carry on. How do I ensure this happens?

    2) More of a problem is that the remote backup is not working. My script ends with:

    select left.newer.files left.orphan.files
    copy left->right
    select right.orphan
    delete right

    When I look at the log, all the commands are executed at the same time, but nothing actually happens. But there are plenty of changed files! I have also tried the synchronise facility, but that appears not to ignore newer files, even though I have those options set in Sync Options. What am I doing wrong?

    Thanks

  • #2
    Re: Various problems with backup

    Hi Mark!

    1) I would recommend creating a DOS batchfile in which BC is called with a script for each user e.g.

    ------------------------------
    bc2.exe @user1.bcs

    bc2.exe @user2.bcs

    and so on
    ------------------------------

    Probably you may want to check %errorlevel% between the calls to notice any errors, but I remember darkly that it might not work fine in the current release 2.2.7

    2) It would have been usefull if you had posted your complete script. So we can only guess ...

    I assume the lack of an expand command in the script. See the onlinehelp (Script Reference) for further informations.
    Quote: Folders must be opened, so that their contents can be used by other instructions, e.g. SELECT.


    Bye
    Christoph

    Comment


    • #3
      Re: Various problems with backup

      Doh! Thank you! Problem #2 solved.

      Problem #1. I am currently running this through one call to BC. My script is something like this:

      load "Fred Bloggs"
      sync create-empty mirror:lt->rt
      load "Jon Doe"
      sync create-empty mirror:lt->rt

      etc.

      Are you saying that this will not work, and I need the batch file, or multiple Scheduled tasks (one for each user)?

      Comment


      • #4
        Re: Various problems with backup

        As soon as the script has an error, such as being unable to load a base folder, it will exit. The only way to get around this is to call the script separately for each session/base folder pair. Having an option to jump to the next load statement on an error is on our feature wish list for a future version of BC.
        Chris K Scooter Software

        Comment


        • #5
          Re: Various problems with backup

          Having an option to jump to the next load statement on an error is on our feature wish list for a future version of BC.
          Is this feature available in BC yet? I am using 2.4.1 and am trying to avoid having to write 20 different scripts if I can just write 1. Thanks!

          Comment


          • #6
            Re: Various problems with backup

            I'm the anonymous user above and wanted to bump this to the front (since my prior post didn't seem to do so).

            Please let me know if the "ignore load error" functionality is present in BC 2.4.1. Thanks!

            Comment


            • #7
              Re: Various problems with backup

              The ignore load error feature isn't in BC 2.4.1. The best way to work around this right now is to create one script that takes parameters from the command line, then use a batch file to call the script for every set of servers/folders you need to sync.
              Chris K Scooter Software

              Comment


              • #8
                Re: Various problems with backup

                Thanks Chris. I'll give that a try!

                Comment


                • #9
                  Re: Various problems with backup

                  I'm posting my work-around for anyone else who might be experiencing this issue. Credit for most of the code goes to "DrWarezz" who posted on experts-exchange.com:
                  http://www.experts-exchange.com/Oper..._21263130.html

                  To gracefully avoid BC load errors, first create a text file that contains all of the machine names you want to check. The batch file below cycles through the list and pings each machine ... if the machine responds, then it calls the BC script (w/ parameters). If the machine is unresponsive, then it writes an entry to a MACHINE_DOWN.log file.

                  Enjoy!

                  ---BEGIN BATCH FILE------------------

                  @ECHO OFF
                  TITLE Ping-N-Move

                  REM -----------------------------------
                  REM

                  SET MachineList=E:\Scripts\MACHINES.txt
                  SET ResultsFile=E:\MACHINE_DOWN.log
                  SET MM=%DATE:~4,2%
                  SET DD=%DATE:~7,2%
                  SET YY=%DATE:~12,2%
                  SET YYYY=%DATE:~10,4%
                  SET HH=%TIME:~0,1%
                  SET NN=%TIME:~3,2%
                  if "%HH%"==" " (
                  SET HH=%TIME:~1,1%
                  ) else (
                  SET HH=%TIME:~0,2%
                  )

                  REM
                  REM -----------------------------------

                  CLS
                  ECHO.
                  IF NOT EXIST "%MachineList%" (
                  ECHO Cannot locate machine list: %MachineList%
                  PAUSE>NUL
                  GOTO :EOF
                  )

                  ECHO Processing all machine names in %MachineList% . . .
                  ECHO.

                  FOR /f "tokens=*" %%M in (%MachineList%) do CALL :CHECK "%%M"

                  GOTO :EOF

                  :CHECK
                  SET Machine=%~1
                  SET Machine=%Machine: =%

                  PING -w 1000 %Machine%>NUL
                  IF %ERRORLEVEL% NEQ 0 ECHO %YYYY%/%MM%/%DD% %HH%:%NN% NO RESPONSE %Machine%>>%ResultsFile%
                  IF %ERRORLEVEL% == 0 call "c:\program files\beyond compare 2\bc2.exe" @e:\scripts\bc_move.txt "\\%Machine%\c$\files" "E:\files" \silent

                  EXIT /B

                  ---END BATCH FILE------------------

                  Comment


                  • #10
                    Re: Various problems with backup

                    Chris, it looks like BC3 will soon become a reality. Can you please confirm/deny that BC3 will have an option to ignore load errors in scripts?

                    The existence of this one single feature will determine whether my company upgrades to the new version!

                    Comment


                    • #11
                      Re: Various problems with backup

                      Hi Dan,

                      Sorry, I'm not sure if this will be in version 3. I haven't heard much from our development team about scripting in version 3 yet.
                      Chris K Scooter Software

                      Comment

                      Working...
                      X