Robocopy issue with Reflect 7.1


Author
Message
bk3
bk3
New Member
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 4, Visits: 17
I just upgraded from Reflect 7.0 to 7.1. I am running a vbscript file to synchronize backups between multiple disk drives. The command used to do the synchronization is:

robocopy <SOURCE DIRECTORY> <DESTINATION DIRECTORY> *.mr* /copyBigGrinAT /e /purge /r:0 /m /np /eta /log+:<LOG FILE>

I am using the /m parameter to only synchronize files with the archive flag set, and then to reset it. This worked fine in 7.0. But now, I am getting the error:

2017/10/04 21:40:28 ERROR 1296 (0x00000510) Changing File Attributes <FILENAME>.mrbak
The requested file operation failed because the storage policy blocks that type of file. For more information, contact your system administrator.

and the archive bit is not being reset.

If I run robocopy from the command line, it works ok. I'm thinking that this is related to the new MIG protection, since with MIG on, I am unable to manually reset the Archive flag using attrib command.

Any ideas on how to fix this?

Thanks
Edited 5 October 2017 7:14 PM by bk3
jphughan
jphughan
Most Valuable Professional
Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)
Group: Forum Members
Posts: 2.2K, Visits: 14K
That's Macrium Image Guardian, which is new for 7.1 and which you can read about here.  Robocopy is actually allowed by default even when MIG is active, but only when certain rules about the source and destination are met.  The KB I linked details that as well.

Unrelated, assuming the part after /copy was originally "DAT" before being partially replaced with the smiley face, DAT is the default mode anyway, so it can be omitted.  And "/e /purge" can together be replaced with just "/mir", which is functionally equivalent.

Edited 5 October 2017 8:09 PM by jphughan
Nick
Nick
Macrium Representative
Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)
Group: Administrators
Posts: 1.3K, Visits: 6.9K
Hi @bk3

Thanks for posting. 

We'll double check with those parameters to make sure they're supported.  

Kind Regards

Nick - Macrium Support

bk3
bk3
New Member
New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)New Member (9 reputation)
Group: Forum Members
Posts: 4, Visits: 17
Thanks @phughan for the tip on Robocopy. After my initial post I did realize that MIG was involved. The copy part does actually work fine, it's just the updating of the archive flag after the copy that doesn't seem to work when running a vbscript from within Reflect. It did however work when I ran robocopy from a command line (even running not as an Admin). 
Nick
Nick
Macrium Representative
Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)
Group: Administrators
Posts: 1.3K, Visits: 6.9K
Hi @bk3

We've checked with the same RoboCopy switches and it appears to be fine, both from VBScript, PowerShell and the command line.  The parent process of RoboCopy doesn't affect whether the process is allowed access to backup files and the archive bit, so this is unexpected. 

v7.1.2619, the latest release. 

VBScript source:
https://forum.macrium.com/uploads/images/23b00dcc-03ac-4b28-adfe-d037.png

Before running the script
Source:
https://forum.macrium.com/uploads/images/7605c5b9-4cf4-41b1-9a85-d1b6.png
Target:
https://forum.macrium.com/uploads/images/ad432409-3a1e-4f58-a6c6-564f.png

After running the script
Source:
https://forum.macrium.com/uploads/images/cbc5e2af-54c9-4957-bf40-6137.png
Target:
https://forum.macrium.com/uploads/images/3e690f02-a273-403b-bce5-c1ae.png

Both F: and E: are MIG protected volumes and 'F:\Robo Sync' is a backup target in the saved xml file that generated the VBScript source.

Can you let me know if there is anything different in your setup that we've missed?


Kind Regards

Nick - Macrium Support

Edited 6 October 2017 12:28 AM by Nick
RayG
RayG
Advanced Member
Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)
Group: Forum Members
Posts: 222, Visits: 960
@Nick

I have taken a look at: https://knowledgebase.macrium.com/display/KNOW7/Macrium+Image+Guardian
and I see that the ROBOCOPY /MIR option is allowed
so I wanted to run the command:
robocopy v:\Macrium t:\Mtest /mir

which if I have it correct will mirror the source to the destination.
In this instance the source is a MIG protected drive (VSmile
The target is not the target of any MR backup (TSmile
The MR application does not have any XML definition files defined nor does it have any entries in the other tabs - they are all blank
If I first run the command to list the files:
C:\>robocopy v:\Macrium q:\Mtest /mir /l

-------------------------------------------------------------------------------
 ROBOCOPY  ::  Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : 13 October 2017 15:46:35
 Source : v:\Macrium\
  Dest : q:\Mtest\

  Files : *.*

Options : *.* /L /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30

------------------------------------------------------------------------------

    New Dir    0  v:\Macrium\
    New Dir    5  v:\Macrium\FileFolder\
    New File      267   FileFolder #2017-02-22-15-18#-00-00-Full.txt
    New File     4.8 m   FileFolder #2017-02-22-15-18#-00-00.mrbak
    New File      204   FileFolder #2017-02-22-15-18#-01-01-Inc.txt
    New File     724640   FileFolder #2017-02-22-15-18#-01-01.mrbak
    New File     1.0 m   FileFolder 2016-01-22-16-08#-00-00.mrbak
    New Dir    2  v:\Macrium\FileFolderEX\
    New File     720970   65459BD0C0D956B5-00-00.mrbak
    New File     717540   FFEX-00-00.mrbak
    New Dir   37  v:\Macrium\MacriumTest\
    New File      4951   Manual_Backup #2017-06-20-08-50#-00-00-Full.txt
    New File     61.8 m   Manual_Backup #2017-06-20-08-50#-00-00.mrimg
    New File      550   Manual_Backup #2017-06-20-08-50#-03-03-Diff.txt
    New File     673779   Manual_Backup #2017-06-20-08-50#-03-03.mrimg
    New File      549   Manual_Backup #2017-06-20-08-50#-04-04-Inc.txt
    New File     170384   Manual_Backup #2017-06-20-08-50#-04-04.mrimg
    New File      5033   Manual_Backup #2017-06-20-08-50#-05-05-Inc.txt
    New File     170458   Manual_Backup #2017-06-20-08-50#-05-05.mrimg
    New File      543   Manual_Backup #2017-06-20-08-50#-06-06-Diff.txt
    New File     698355   Manual_Backup #2017-06-20-08-50#-06-06.mrimg
    New File      4950   Manual_Backup #2017-07-17-13-17#-00-00-Full.txt
    New File     61.8 m   Manual_Backup #2017-07-17-13-17#-00-00.mrimg
    New File      549   Manual_Backup #2017-07-17-13-17#-01-01-Inc.txt
    New File     223660   Manual_Backup #2017-07-17-13-17#-01-01.mrimg
    New File      5032   Manual_Backup #2017-07-17-13-17#-02-02-Inc.txt
    New File     153966   Manual_Backup #2017-07-17-13-17#-02-02.mrimg
    New File      5009   Manual_Backup #2017-07-17-13-17#-03-03-Diff.txt
    New File     497651   Manual_Backup #2017-07-17-13-17#-03-03.mrimg
    New File      5327   Manual_Backup #2017-07-17-13-17#-04-04-Inc.txt
    New File     153966   Manual_Backup #2017-07-17-13-17#-04-04.mrimg
    New File      4971   Manual_Backup #2017-07-17-13-17#-05-05-Inc.txt
    New File     416558   Manual_Backup #2017-07-17-13-17#-05-05.mrimg
    New File      4941   Manual_Backup #2017-07-17-13-17#-06-06-Diff.txt
    New File     714739   Manual_Backup #2017-07-17-13-17#-06-06.mrimg
    New File      4884   Manual_Backup #2017-07-28-16-23#-00-00-Diff.txt
    New File      4949   Manual_Backup #2017-07-28-16-23#-00-00-Full.txt
    New File      4884   Manual_Backup #2017-07-28-16-23#-00-00-Inc.txt
    New File     61.8 m   Manual_Backup #2017-07-28-16-23#-00-00.mrimg
    New File      5272   Manual_Backup #2017-07-28-16-23#-01-01-Inc.txt
    New File     621482   Manual_Backup #2017-07-28-16-23#-01-01.mrimg
    New File      4977   Manual_Backup #2017-07-28-16-23#-02-02-Inc.txt
    New File     404094   Manual_Backup #2017-07-28-16-23#-02-02.mrimg
    New File      4946   Manual_Backup #2017-07-28-16-23#-03-03-Diff.txt
    New File     911347   Manual_Backup #2017-07-28-16-23#-03-03.mrimg
    New File       0   Manual_Backup #2017-09-29-00-00.mrimg
    New File      4860   Manual_Backup #2017-09-29-13-42#-00-00-Full.txt
    New File     61.7 m   Manual_Backup #2017-09-29-13-42#-00-00.mrimg
    New Dir    1  v:\Macrium\MyTest\
    New File     239.2 m   74EEFB3CF161442F-00-00.mrimg

------------------------------------------------------------------------------

     Total  Copied Skipped Mismatch  FAILED  Extras
  Dirs :   5   5   0   0   0   0
 Files :   45   45   0   0   0   0
 Bytes : 500.14 m 500.14 m   0   0   0   0
 Times : 0:00:00 0:00:00        0:00:00 0:00:00
 Ended : 13 October 2017 15:46:35
I see the full list that would be copied, if I remove the /L and run the same command again you can see that the files are indeed copied without issue.

C:\>robocopy v:\Macrium t:\Mtest /mir

-------------------------------------------------------------------------------
 ROBOCOPY  ::  Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : 13 October 2017 16:02:14
 Source : v:\Macrium\
  Dest : t:\Mtest\

  Files : *.*

Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30

------------------------------------------------------------------------------

         0  v:\Macrium\
         5  v:\Macrium\FileFolder\
100%   New File     4.8 m   FileFolder #2017-02-22-15-18#-00-00.mrbak
100%   New File      204   FileFolder #2017-02-22-15-18#-01-01-Inc.txt
100%   New File     724640   FileFolder #2017-02-22-15-18#-01-01.mrbak
100%   New File     1.0 m   FileFolder 2016-01-22-16-08#-00-00.mrbak
    New Dir    2  v:\Macrium\FileFolderEX\
100%   New File     720970   65459BD0C0D956B5-00-00.mrbak
100%   New File     717540   FFEX-00-00.mrbak
    New Dir   37  v:\Macrium\MacriumTest\
100%   New File      4951   Manual_Backup #2017-06-20-08-50#-00-00-Full.txt
100%   New File     61.8 m   Manual_Backup #2017-06-20-08-50#-00-00.mrimg
100%   New File      550   Manual_Backup #2017-06-20-08-50#-03-03-Diff.txt
100%   New File     673779   Manual_Backup #2017-06-20-08-50#-03-03.mrimg
100%   New File      549   Manual_Backup #2017-06-20-08-50#-04-04-Inc.txt
100%   New File     170384   Manual_Backup #2017-06-20-08-50#-04-04.mrimg
100%   New File      5033   Manual_Backup #2017-06-20-08-50#-05-05-Inc.txt
100%   New File     170458   Manual_Backup #2017-06-20-08-50#-05-05.mrimg
100%   New File      543   Manual_Backup #2017-06-20-08-50#-06-06-Diff.txt
100%   New File     698355   Manual_Backup #2017-06-20-08-50#-06-06.mrimg
100%   New File      4950   Manual_Backup #2017-07-17-13-17#-00-00-Full.txt
100%   New File     61.8 m   Manual_Backup #2017-07-17-13-17#-00-00.mrimg
100%   New File      549   Manual_Backup #2017-07-17-13-17#-01-01-Inc.txt
100%   New File     223660   Manual_Backup #2017-07-17-13-17#-01-01.mrimg
100%   New File      5032   Manual_Backup #2017-07-17-13-17#-02-02-Inc.txt
100%   New File     153966   Manual_Backup #2017-07-17-13-17#-02-02.mrimg
100%   New File      5009   Manual_Backup #2017-07-17-13-17#-03-03-Diff.txt
100%   New File     497651   Manual_Backup #2017-07-17-13-17#-03-03.mrimg
100%   New File      5327   Manual_Backup #2017-07-17-13-17#-04-04-Inc.txt
100%   New File     153966   Manual_Backup #2017-07-17-13-17#-04-04.mrimg
100%   New File      4971   Manual_Backup #2017-07-17-13-17#-05-05-Inc.txt
100%   New File     416558   Manual_Backup #2017-07-17-13-17#-05-05.mrimg
100%   New File      4941   Manual_Backup #2017-07-17-13-17#-06-06-Diff.txt
100%   New File     714739   Manual_Backup #2017-07-17-13-17#-06-06.mrimg
100%   New File      4884   Manual_Backup #2017-07-28-16-23#-00-00-Diff.txt
100%   New File      4949   Manual_Backup #2017-07-28-16-23#-00-00-Full.txt
100%   New File      4884   Manual_Backup #2017-07-28-16-23#-00-00-Inc.txt
100%   New File     61.8 m   Manual_Backup #2017-07-28-16-23#-00-00.mrimg
100%   New File      5272   Manual_Backup #2017-07-28-16-23#-01-01-Inc.txt
100%   New File     621482   Manual_Backup #2017-07-28-16-23#-01-01.mrimg
100%   New File      4977   Manual_Backup #2017-07-28-16-23#-02-02-Inc.txt
100%   New File     404094   Manual_Backup #2017-07-28-16-23#-02-02.mrimg
100%   New File      4946   Manual_Backup #2017-07-28-16-23#-03-03-Diff.txt
100%   New File     911347   Manual_Backup #2017-07-28-16-23#-03-03.mrimg
100%   New File       0   Manual_Backup #2017-09-29-00-00.mrimg
100%   New File      4860   Manual_Backup #2017-09-29-13-42#-00-00-Full.txt
100%   New File     61.7 m   Manual_Backup #2017-09-29-13-42#-00-00.mrimg
    New Dir    1  v:\Macrium\MyTest\
100%   New File     239.2 m   74EEFB3CF161442F-00-00.mrimg

------------------------------------------------------------------------------

     Total  Copied Skipped Mismatch  FAILED  Extras
  Dirs :   5   3   2   0   0   0
 Files :   45   44   1   0   0   0
 Bytes : 500.14 m 500.14 m   267   0   0   0
 Times : 0:00:00 0:00:00        0:00:00 0:00:00


 Speed :    859735337 Bytes/sec.
 Speed :    49194.450 MegaBytes/min.
 Ended : 13 October 2017 16:02:15


C:\>

If I now delete all the files I just copied, from the target (TSmile and make it a MIG protected drive in the MR GUI (it was not MIG protected before)
when I try to copy the files again I see this:
C:\>robocopy v:\Macrium t:\Mtest /mir

-------------------------------------------------------------------------------
 ROBOCOPY  ::  Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : 13 October 2017 16:05:32
 Source : v:\Macrium\
  Dest : t:\Mtest\

  Files : *.*

Options : *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /R:1000000 /W:30

------------------------------------------------------------------------------

    New Dir    0  v:\Macrium\
    New Dir    5  v:\Macrium\FileFolder\
100%   New File      267   FileFolder #2017-02-22-15-18#-00-00-Full.txt
    New File     4.8 m   FileFolder #2017-02-22-15-18#-00-00.mrbak
2017/10/13 16:05:32 ERROR 1296 (0x00000510) Copying File v:\Macrium\FileFolder\FileFolder #2017-02-22-15-18#-00-00.mrbak
The requested file operation failed because the storage policy blocks that type of file. For more information, contact your system administrator.
Waiting 30 seconds...^C
C:\>
which would seem to be at odds with:
ParameterRule
/MOVE
/MOV

If the source folder is on a protected volume then the /MOVE /MOV parameters will only delete backup files in the source folder if the destination folder is also on a protected volume.

This ensures that existing files cannot be moved to an unprotected volume and compromised.
/MIR
/PURGE

If the target folder is on a protected volume then the the /MIR  /PURGE parameters will only delete backup files in the target folder if both of the following conditions are true:

  1. The source folder is a backup destination in any saved backup definition xml file.
  2. The target folder is not a backup destination in any saved backup defintion xml file

This ensures that the synchronisation operation cannot inadvertantly, or otherwise, delete files in a folder that is used as a backup destination in Macrium Reflect.

All overwrite operationsIf the result of any parameter is to overwrite an existing backup file on a protected volume then this will only be allowed if the target folder is not a backup destination in any saved backup definition xml file.

Have I misunderstood what should be allowed? I think it should allow the copy and be able to delete files on the target when MR has removed them from the source.
At this point in time I am just creating a copy there are no deletions involved. Both disks are fixed drives in the system.








Regards
RayG
Windows10 X64 V1709 B16299.192 MR v7.1.2833

Nick
Nick
Macrium Representative
Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)Macrium Representative (2.3K reputation)
Group: Administrators
Posts: 1.3K, Visits: 6.9K
Hi Ray

The source of the /PURGE /MIR must be a backup destination. Without this restriction a rogue process could sync any empty folder and wipe out the target folder. 


Kind Regards

Nick - Macrium Support

Edited 13 October 2017 4:28 PM by Nick
jphughan
jphughan
Most Valuable Professional
Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)
Group: Forum Members
Posts: 2.2K, Visits: 14K
Interesting find. Rereading the KB article myself, it technically doesn't cover this situation.  It discusses moving backup files from a MIG-protected source to a MIG-protected destination and deleting backup files from a MIG-protected destination, but not copying backup files from a MIG-protected source to another MIG-protected destination.  I would think this should be allowed, but I'm curious to hear what Macrium has to say.

EDIT: Nick beat me to it with a typically perfectly sensible answer.

Edited 13 October 2017 4:35 PM by jphughan
RayG
RayG
Advanced Member
Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)Advanced Member (450 reputation)
Group: Forum Members
Posts: 222, Visits: 960
@Nick,

The source is a MIG protected location and a destination for backups.

PS C:\Users\ray> D:\Macrium\Manual_Backup.ps1

PowerShell script for Macrium Reflect Backup:

 Defintion: [D:\Macrium\Manual_Backup.xml]
    to: [V:\Macrium\MacriumTest\Manual_Backup #2017-09-29-13-42#...]
Drive Letter: [V]
Volume Label: [Video]
 Disk Size: [600.00 GB]
Free space: [231.78 GB]

* Running the backup... -Inc [No Parameters given]
.
.
.
--------------------------------------------------------------------------------
Image ID - 0057FB1F5FDB972D
--------------------------------------------------------------------------------
Destination:
Backup Type:    Incremental
File Name:     Append to recent image in directory 'V:\Macrium\MacriumTest\'
        V:\Macrium\MacriumTest\Manual_Backup #2017-09-29-13-42#-01-01.mrimg




Regards
RayG
Windows10 X64 V1709 B16299.192 MR v7.1.2833

jphughan
jphughan
Most Valuable Professional
Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)Most Valuable Professional (3.1K reputation)
Group: Forum Members
Posts: 2.2K, Visits: 14K
RayG - 13 October 2017 5:31 PM
@Nick,

The source is a MIG protected location and a destination for backups.

PS C:\Users\ray> D:\Macrium\Manual_Backup.ps1

PowerShell script for Macrium Reflect Backup:

 Defintion: [D:\Macrium\Manual_Backup.xml]
    to: [V:\Macrium\MacriumTest\Manual_Backup #2017-09-29-13-42#...]
Drive Letter: [V]
Volume Label: [Video]
 Disk Size: [600.00 GB]
Free space: [231.78 GB]

* Running the backup... -Inc [No Parameters given]
.
.
.
--------------------------------------------------------------------------------
Image ID - 0057FB1F5FDB972D
--------------------------------------------------------------------------------
Destination:
Backup Type:    Incremental
File Name:     Append to recent image in directory 'V:\Macrium\MacriumTest\'
        V:\Macrium\MacriumTest\Manual_Backup #2017-09-29-13-42#-01-01.mrimg



Earlier you said, "The MR application does not have any XML definition files defined nor does it have any entries in the other tabs - they are all blank."  That means your Robocopy source is NOT a known destination for backups -- currently.  Reflect uses the definition files "registered" in the Backup Definition Files tab to establish backup destinations, both for determining where to automatically enable MIG (if "Automatically protect local backup drives" is enabled, which it is by default) and apparently for determining whether a given Robocopy execution satisfies MIG's conditions.  It does not go back and parse every log file to determine which locations have ever been a backup destination, and I would argue that doing so would be undesirable in many cases, particularly as it could force users to choose between deleting certain logs to get MIG to function as they wanted or disabling MIG entirely.

If you want your Robocopy source to be recognized as a destination, add the XML back to the Backup Definition Files tab, even if you leave the schedule blank since you're calling it via script.

Edited 13 October 2017 5:44 PM by jphughan
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search