Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2016
    Posts
    7

    Default Unable to Clear Read-Only Tags

    I wrote a script to run a mirror backup of my PC to an external HDD. This went well. I then used a similar script to make a 'differential style' backup using UPDATE instead of MIRROR.

    However, it seems the previous backup applied read-only flags to all the files & I get a failure report like this:
    Unable to copy \\MyPC\HDD\Backup\Beyond Compare\Using Beyond Compare for backups - mirroring.url: Read-only archive
    I tried to clear the flags in Properties but that does not work. I then used a script that was supposed to remove flags but that fails as well.
    #Must expand all folders so that select will work
    expand all
    # Select all files in the backup directory on server
    select right
    # Clear the read only flag on the backup directory on server
    attrib -r
    # Assume yes to all confirmation messages
    option confirm:yes-to-all
    Any help would be appreciated. I just purchased BC4 as my backup software is not compatible with Windows 10 & now I have no backup!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    It looks like the whole script is attempting to expand a read only archive and then copy into it. Are you loading a .rar file or similar archive as the destination folder? We support opening and copying into some archives, but only opening and comparing others. What is the file extension of the destination side?

    Would you also be able to post your full script? We could also better determine if there is a configuration issue. By default, BC4 would copy full archives as files, so even read only archives would copy over as full files if they've been updated.
    Aaron P Scooter Software

  3. #3
    Join Date
    Apr 2016
    Posts
    7

    Default

    I have fixed the flags issue although I still don't know why they were there in the first place. I added the 'flag fix' but left the right compare as a snapshot ...which causes an error.

    I had hoped to create a backup script that referred to a snapshot as I would like the process to be as fast as possible. The whole 'expand all' flag fix suggests a major addition to work load (& time). My first backup was a MIRROR + snapshot. I then hoped to refer to that snapshot for UPDATE + snapshot backups.

    Original scripts that caused flagging issues as follows, you'll note a networked computer is included in the backup:
    # Turn logging on
    log normal "F:\Backup\Backuplog_%date%.txt"
    # Set comparison criteria - crc requires opening file, is slow & could update corrupted files?
    criteria timestamp size
    # Exclude certain file types
    filter "-*.tmp"
    # Load the base folders
    load "\\MyOtherPC\DATA1" "F:\Backup\DATA1"
    # Make the target identical to the source
    # includes deleting files that only exist on the target side & creating empty folders.
    sync create-empty mirror:lt->rt
    snapshot left output:F:\Backup\lastsync_DATA1.bcss

    # Set comparison criteria - crc requires opening file, is slow & could update corrupted files?
    criteria timestamp size
    # Exclude certain file types
    filter "-.\Cache\;-.\Cache_ACR\;-.\Temp\;-.\Dropbox\"
    # Load the base folders
    load "D:\" "F:\Backup\DATA2"
    # Make the target identical to the source
    # includes deleting files that only exist on the target side & creating empty folders.
    sync create-empty mirror:lt->rt
    snapshot left output:F:\Backup\lastsync_DATA2.bcss
    then...
    # Turn logging on
    log normal "F:\Backup\Backuplog_%date%.txt"
    # Set comparison criteria - crc requires opening file, is slow & could update corrupted files?
    criteria timestamp size
    # Exclude certain file types
    filter "-*.tmp"
    # Load the base folders
    load "\\ MyOtherPC \DATA1" "F:\Backup\lastsync_DATA1.bcss"
    # Copies newer and orphan files from left to right
    # no files deleted & creating empty folders.
    sync create-empty update:lt->rt
    snapshot left output:F:\Backup\lastsync_DATA1.bcss

    # Set comparison criteria - crc requires opening file, is slow & could update corrupted files?
    criteria timestamp size
    # Exclude certain file types
    filter "-.\Cache\;-.\Cache_ACR\;-.\Temp\;-.\Dropbox\"
    # Load the base folders
    load "D:\" "F:\Backup\lastsync_DATA2.bcss"
    # Copies newer and orphan files from left to right
    # no files deleted & creating empty folders.
    sync create-empty update:lt->rt
    snapshot left output:F:\Backup\lastsync_DATA2.bcss

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    Snapshots are read-only resources and are not an item you can perform a sync into. They are designed to act as virtual representations of a folder structure at a point in time; they can be compared against, but cannot be updated and contain no actual file data. They are essentially just the folder/file list of names, dates, crc, etc.

    You can load and refer to a snapshot, but must then use a combination of select command and copyto command to copy to the actual backup location. Then once the sync is complete, generate a new snapshot of the updated version to compare against the next time around.
    This could be
    expand all
    select left.orphan.files left.newer.files. left.diff.files left.older.files
    copyto left path:relative "f:\backup\data2temptest\"

    **Please be careful testing script actions such as copy or mirror. There is no method to Undo any actions taken, and scripted tasks are automated and offer no preview.**

    A Sync Mirror, for example, will delete any files in the Destination side that do not exist in the Source side. Is this behavior you desire?
    In my above script sample, I am also overwriting Newer files with Older files in the Destination, similar to how a Mirror would function. Would this also be needed or should select left.older.files be removed?

    The use of a snapshot is a legitimate strategy to try and increase the speed, assuming the snapshot is a reliable measure and the destination is never externally updated. It does create extra complexity when creating the script. Using criteria timestamp/size is usually not significantly slow even over the network; if you use a test script to set:
    criteria size timestamp
    load "location A" "\\locationB\"

    How long does it take for the script to load the two sections, and is the time here worth the extra management of a snapshot?
    Aaron P Scooter Software

  5. #5
    Join Date
    Apr 2016
    Posts
    7

    Default

    Superb support here, thanks!

    With a minor modification, I think we have it in:
    ...
    load "D:\" "F:\Backup\lastsync_DATA2.bcss"
    expand all
    select left.orphan.files left.newer.files. left.diff.files left.empty.folders
    option confirm:yes-to-all
    copyto left path:relative "F:\Backup\DATA2"
    snapshot left output:F:\Backup\lastsync_DATA2.bcss
    I needed an 'option confirm'. Is the trailing slash in the destination path necessary?

    Is there any way to initiate a SHUTDOWN? I read it is on the ToDo list...
    Last edited by 20pictures; 26-Apr-2016 at 11:47 AM.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    No method within BC to initiate a shutdown, but you could place the call to bc within a larger batch wrapper or as part of the Windows Scheduled Task.

    Please note that "diff" is a specific status of files that are neither Newer or Older. They are files that somehow have equal timestamps but different sizes. If you are certain you want to overwrite these in this case, include it, but it may be worth using the graphical interface to track down and find what might be causing these files. In most cases, if a file's size has been altered the timestamp should be updated to reflect the edit.
    Aaron P Scooter Software

  7. #7
    Join Date
    Apr 2016
    Posts
    7

    Default

    ...continuing with the backup project. I'm now writing a script to update folders in an ARCHIVE HDD from a WorkInProgress source. Obviously, I don't want to delete folders that have been moved off the WIP drive but I do want to purge the active folder backups.

    I think this can be done by first UPDATE the ARCHIVE. Later when the active folders are edited, I can MIRROR those folders & purge unwanted files. To prevent deleting the right.orphan.folders I need to find way to EXCLUDE them whilst still keeping left.orphan.folders selected. I thought maybe something like this:
    ...
    expand all
    select left.all.files right.older.files
    # This command does not use the current selection.
    sync visible mirror:lt->rt
    Is there a better way as I assume this doesn't work?
    Last edited by 20pictures; 27-Apr-2016 at 06:41 AM.

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    The sync visible option will effect items that are expanded; the selection step does not limit the items. If you have already selected the specific files that need to copy, you can use the copy command instead.

    What criteria difference is there between folders that have been moved off vs the need to "purge"? Are these empty folders we need to sync/interact with? Or are they the files within we need to compare and sync or delete?
    Aaron P Scooter Software

  9. #9
    Join Date
    Apr 2016
    Posts
    7

    Default

    left - WIP / right - ARCHIVE

    There are completed jobs archived in folders on right. These are not to be updated or DELETED ...they are orphans.

    As work progresses on the WIP drive, I would like to backup any new/ modified files & purge.right any files I deleted
    ...the files within we need to compare and sync or delete
    WITHOUT AFFECTING ORPHANS IN ARCHIVE.

    This may sound a bit dramatic but in December 2014, I accidentally/unknowingly deleted my entire Portfolio of 15 years of completed work in my WIP drive! MIRROR to backup then purged my backup. I later backed my backup up another backup drive & erased all copies. By the time I discovered, it was too late for recovery software...

    This is why I'm so pedantic about scripts ...I want to reduce the human error element with tested scripts!
    Last edited by 20pictures; 27-Apr-2016 at 11:08 AM.

  10. #10
    Join Date
    Apr 2016
    Posts
    7

    Default UPDATE

    ...I have decided to change my workflow so that Active & Archived folders are not on the same backup drive. This works around the issue I was having.

    I would like to thank you for the amazing support (I have learnt a lot) & I consider this problem solved...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •