Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2014
    Location
    Ottawa, Canada
    Posts
    2

    Question Is there a way to detect errors

    I've a bit of scripting to do. Make a backup of a folder system and then empty the source folder structure after the backup. I'd really like to know if the backup actually worked. I don't see error-detecting in the scripting guide. Is there an obvious way to do this that I can't see?

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

    Default

    Hello,

    You would need to use the "log" scripting command as the first line of your script, and then search if a file copy error or other file operation error occurred. The other method would be to generate a folder-report after the 'backup' but before emptying the source, as any differences would be files that were not backed up.

    We also have the "option stop-on-error" line, which could be the second line of your script. If any errors occur, the script will stop.

    What do you mean by emptying the source folder as well? Are you deleting the original after copying to a 'backup' location? Do you have another, secondary location to serve as an actual backup? In general, it is a good practice to always have the files in at least two locations, in case one location fails you can restore from the other.

    Fatal errors (such as failing to load a base folder) will be logged and also prevent the script from running.
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2014
    Location
    Ottawa, Canada
    Posts
    2

    Default

    You're correct. I'm planning to delete the original after copying to the backup location. And I agree: there's no way I should do this without first making a safe copy that I can go back to should a disaster befall me.

    Thanks for the suggestion about searching the log for errors. I hadn't thought of that. I still have to make sure with the customer whether I can rely on there being a person to verify that everything went well before eradicating the safe copy.

    Thanks Aaron. I see your support is as good as your product.
    Last edited by Aaron; 02-Oct-2014 at 12:25 PM.

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

    Default

    Yes, and let us know if you have any other questions.

    To clarify, we sometimes see customers who 'backup' to an external drive, and then delete the source. At which point, if that external drive fails or is stolen, the 'backup' is gone since it was the only copy of the data. I just wanted to warn against this scenario, and recommend that you have the data in at least two independent locations before deleting the original.

    Update: And a Folder Compare of Source <> Backup running a binary compare, and then generating a folder-report, would give you a quick overview if all of the files are binary equal or if any are missing.
    Aaron P Scooter Software

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
  •