Announcement

Collapse
No announcement yet.

Background or lower priority I/O file transfer options?

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

  • Background or lower priority I/O file transfer options?

    More recent versions of Windows support background file transfer and/or lower I/O priority for processes.

    It would be helpful to take advantage of these OS features from Beyond Compare. I'd like to be able to run a "background" sync that would not overwhelm the drive and network, so other (higher priority) functions on the system are not adversely affected.

    I brought this up with BC3 over 4 years ago. Has any progress been made with BC4?

  • #2
    Hello,

    This is still something on our Customer Wishlist. We haven't been able to tackle it yet, but it is something we are keeping in mind as a potential future enhancement.
    Aaron P Scooter Software

    Comment


    • #3
      While we're waiting for the "wishlist", I've developed a somewhat "inelegant" workaround. This implements a low IO priority mirroring backup function that won't impair the normal system operation. Rather than perform a pure mirror, it moves deleted files to a "Deleted" folder on the backup drive. I was hoping to make this work like a Recycle bin, and keep deleted files until space is needed. Since that doesn't appear to be possible, I settled for a simple "delete older than". Based on my available space on the server I have that set to 90 days, but it can adjust as needed. I hope this is useful to others.

      For the priority control I found a program that can lower the IOpriority of an Windows Process.

      I started with Chris' suggested script in this thread, and edited to this script:

      Code:
      log verbose "C:\Batch\SageD_BCscript_log.txt"
      load "D_SageTV <--> \\SUN\Sage-D-Backup"
      expand all
      select rt.orphan.files
      moveto right path:base \\SUN\Sage-D-Backup\Deleted
      sync mirror:left->right
      The main command script runs as a a scheduled task:

      Code:
      echo Starting sync Sage D to SUN | timestamppipe.exe >> C:\Batch\Sync_SageD_to_SUN_log.txt
      rem ****** clean up files on backup drive that were deleted more than 90 days ago
      c:\batch\deleteolderthan.exe \\SUN\Sage-D-Backup\Deleted\*.* /D90
      
      rem ****** Start a separate process for Beyond Compare Script in parallel 
      start "Exec_SageD_BCsync" "C:\batch\Exec_SageD_BCsync.cmd" 
      
      rem ****** Set the BC Script Process to Low IO Priority  (give a few seconds to launch BC)
      sleep 5
      call Set_BC_Low_IO_Priority.cmd
      The BC Script is run as a separate task "Exec_SageD_BCsync.cmd" from the Start command:

      Code:
      set ttextnum=-cc *******
      "C:\Program Files\Beyond Compare 4\BCompare.exe" @C:\Batch\SageD_BCscript.txt /silent
      if errorlevel==1 goto err1
      echo Completed BC Sync -- Sage D to SUN | timestamppipe.exe >> C:\Batch\Sync_SageD_to_SUN_log.txt
      goto end
      :err1
      echo ERROR reported ---- syncing Sage D to SUN | timestamppipe.exe >> C:\Batch\Sync_SageD_to_SUN_log.txt
      echo Sync_SageD_to_SUN Error > C:\Batch\SyncSageD.txt
      Blat C:\Batch\SyncSageD.txt**** %ttextnum%  -server **** -subject "Error BC Sync SageD to SUN"
      :end
      exit
      The IOPriority script "Set_BC_Low_IO_Priority.cmd" looks like this. It uses TaskList and Grep to get the PID of BeyondCompare. The task name function in IOPriorityV1.1.exe does not seem to work, so I had to find a way to derive the PID.

      Code:
      tasklist | grep BCompare > c:\batch\bc_task.txt
      for /f "tokens=2" %%a in (c:\batch\bc_task.txt) do set PID2=%%a
      if %PID2%X==X goto err1
      c:\batch\IOPriorityV1.1.exe %PID2% 0
      echo IOPriority set BCompare to Lower Priority | timestamppipe.exe >> C:\Batch\Sync_SageD_to_SUN_log.txt
      goto end
      :err1
      echo ERROR IOPriority Did Not Find BCompare running | timestamppipe.exe >> C:\Batch\Sync_SageD_to_SUN_log.txt
      :end
      Last edited by timg11; 21-Feb-2015, 07:25 PM.

      Comment

      Working...
      X